We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d61527e commit e59fce2Copy full SHA for e59fce2
tests/test_start_kernel.py
@@ -50,14 +50,18 @@ def test_ipython_start_kernel_userns():
50
assert EXPECTED in text
51
52
53
-@pytest.mark.flaky(max_runs=3)
54
def test_start_kernel_background_thread():
55
cmd = dedent(
56
"""
57
import threading
+ import asyncio
58
from ipykernel.kernelapp import launch_new_instance
59
60
def launch():
61
+ # Threads don't always have a default event loop so we need to
62
+ # create and set a default
63
+ loop = asyncio.new_event_loop()
64
+ asyncio.set_event_loop(loop)
65
launch_new_instance()
66
67
thread = threading.Thread(target=launch)
0 commit comments