File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -22,11 +22,6 @@ class _instances:
22
22
reactor = None
23
23
24
24
25
- def pytest_configure ():
26
- pytest .inlineCallbacks = inlineCallbacks
27
- pytest .blockon = blockon
28
-
29
-
30
25
def blockon (d ):
31
26
if _config .external_reactor :
32
27
return block_from_thread (d )
@@ -185,4 +180,6 @@ def pytest_addoption(parser):
185
180
186
181
187
182
def pytest_configure (config ):
183
+ pytest .inlineCallbacks = inlineCallbacks
184
+ pytest .blockon = blockon
188
185
reactor_installers [config .getoption ("reactor" )]()
Original file line number Diff line number Diff line change @@ -41,6 +41,14 @@ def cmd_opts(request):
41
41
return ("--reactor={}" .format (reactor ),)
42
42
43
43
44
+ def test_inline_callbacks_in_pytest ():
45
+ assert hasattr (pytest , 'inlineCallbacks' )
46
+
47
+
48
+ def test_blockon_in_pytest ():
49
+ assert hasattr (pytest , 'blockon' )
50
+
51
+
44
52
def test_fail_later (testdir , cmd_opts ):
45
53
test_file = """
46
54
from twisted.internet import reactor, defer
You can’t perform that action at this time.
0 commit comments