File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,11 @@ def test_asyncio_loop(kernel):
8383 def do_thing ():
8484 loop .call_later (0.01 , loop .stop )
8585
86- loop = asyncio .get_event_loop ()
86+ try :
87+ loop = asyncio .get_event_loop ()
88+ except RuntimeError :
89+ loop = asyncio .new_event_loop ()
90+ asyncio .set_event_loop (loop )
8791 loop .call_soon (do_thing )
8892 loop_asyncio (kernel )
8993
@@ -128,7 +132,10 @@ def test_qt_enable_gui(kernel, capsys):
128132
129133 enable_gui (not_gui , kernel )
130134 captured = capsys .readouterr ()
131- assert captured .out == f"Cannot switch Qt versions for this session; you must use { gui } .\n "
135+ assert (
136+ captured .out
137+ == f"Cannot switch Qt versions for this session; you must use { gui } .\n "
138+ )
132139
133140 # Check 'qt' gui, which means "the best available"
134141 enable_gui (None , kernel )
You can’t perform that action at this time.
0 commit comments