File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change
1
+ The `blockbuster` test dependency is now optional; the corresponding test fixture is disabled when it is unavailable
2
+ -- by :user:`musicinybrain`.
Original file line number Diff line number Diff line change 12
12
from uuid import uuid4
13
13
14
14
import pytest
15
- from blockbuster import blockbuster_ctx
15
+
16
+ try :
17
+ from blockbuster import blockbuster_ctx
18
+
19
+ HAS_BLOCKBUSTER = True
20
+ except ImportError : # For downstreams only # pragma: no cover
21
+ HAS_BLOCKBUSTER = False
16
22
17
23
from aiohttp import payload
18
24
from aiohttp .client_proto import ResponseHandler
45
51
IS_LINUX = sys .platform .startswith ("linux" )
46
52
47
53
48
- @pytest .fixture (autouse = True )
54
+ @pytest .fixture (autouse = HAS_BLOCKBUSTER )
49
55
def blockbuster (request : pytest .FixtureRequest ) -> Iterator [None ]:
50
56
# Allow selectively disabling blockbuster for specific tests
51
57
# using the @pytest.mark.skip_blockbuster marker.
You can’t perform that action at this time.
0 commit comments