@@ -32,19 +32,17 @@ def format_run_result_output_for_assert(run_result):
32
32
33
33
34
34
def skip_if_reactor_not (expected_reactor ):
35
- actual_reactor = pytest .config .getoption ('reactor' )
35
+ actual_reactor = pytest .config .getoption ('reactor' , 'default' )
36
36
return pytest .mark .skipif (
37
37
actual_reactor != expected_reactor ,
38
- reason = 'reactor is {} not {}' .format (
39
- actual_reactor ,
40
- expected_reactor ,
41
- ),
38
+ reason = 'reactor is {} not {}' .format (actual_reactor , expected_reactor )
42
39
)
43
40
44
41
45
42
@pytest .fixture
46
43
def cmd_opts (request ):
47
- return '--reactor={}' .format (request .config .getoption ('reactor' )),
44
+ reactor = request .config .getoption ('reactor' , 'default' )
45
+ return '--reactor={}' .format (reactor ),
48
46
49
47
50
48
def test_fail_later (testdir , cmd_opts ):
@@ -166,7 +164,6 @@ def test_succeed(foo):
166
164
raise RuntimeError("baz")
167
165
""" )
168
166
rr = testdir .run (sys .executable , "-m" , "pytest" , "-v" , * cmd_opts )
169
- # assert not rr
170
167
assert_outcomes (rr , {'passed' : 2 , 'failed' : 1 })
171
168
172
169
@@ -252,7 +249,6 @@ def test_succeed():
252
249
""" )
253
250
rr = testdir .run (sys .executable , "-m" , "pytest" , "-v" , * cmd_opts )
254
251
assert 'WrongReactorAlreadyInstalledError' in rr .stderr .str ()
255
- # assert_outcomes(rr, {'error': 1})
256
252
257
253
258
254
@skip_if_reactor_not ('default' )
0 commit comments