@@ -63,10 +63,11 @@ def timestamps(self):
6363
6464@pytest .fixture
6565def temp_runtime (tmp_path ):
66- def _temp_runtime (site_config , system = None , options = {}):
66+ def _temp_runtime (site_config , system = None , options = None ):
67+ options = options or {}
6768 options .update ({'systems/prefix' : str (tmp_path )})
6869 with rt .temp_runtime (site_config , system , options ):
69- yield rt . runtime
70+ yield
7071
7172 yield _temp_runtime
7273
@@ -819,6 +820,9 @@ def test_compile_fail_reschedule_main_loop(async_runner, make_cases,
819820 assert_runall (runner )
820821 assert num_checks == len (stats .failed ())
821822
823+ with contextlib .suppress (StopIteration ):
824+ next (ctx )
825+
822826
823827def test_compile_fail_reschedule_busy_loop (async_runner , make_cases ,
824828 make_async_exec_ctx ):
@@ -834,6 +838,8 @@ def test_compile_fail_reschedule_busy_loop(async_runner, make_cases,
834838 assert num_checks == stats .num_cases ()
835839 assert_runall (runner )
836840 assert num_checks == len (stats .failed ())
841+ with contextlib .suppress (StopIteration ):
842+ next (ctx )
837843
838844
839845@pytest .fixture
@@ -875,8 +881,12 @@ def test_restore_session(report_file, make_runner,
875881 assert new_report ['runs' ][0 ]['testcases' ][0 ]['name' ] == 'T1'
876882
877883 # Remove the test case dump file and retry
878- os .remove (tmp_path / 'stage' / 'generic' / 'default' /
879- 'builtin' / 'T4' / '.rfm_testcase.json' )
884+ try :
885+ os .remove (tmp_path / 'stage' / 'generic' / 'default' /
886+ 'builtin' / 'T4' / '.rfm_testcase.json' )
887+ except OSError :
888+ import reframe .utility as util
889+ print ('==> dep_cases' , util .repr (dep_cases ))
880890
881891 with pytest .raises (ReframeError , match = r'could not restore testcase' ):
882892 report .restore_dangling (testgraph )
0 commit comments