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 29ec936 commit 7e2ae22Copy full SHA for 7e2ae22
notebook/tests/launchnotebook.py
@@ -140,9 +140,6 @@ def tmp(*parts):
140
141
started = Event()
142
def start_thread():
143
- if 'asyncio' in sys.modules:
144
- import asyncio
145
- asyncio.set_event_loop(asyncio.new_event_loop())
146
app = cls.notebook = NotebookApp(
147
port=cls.port,
148
port_retries=0,
@@ -156,6 +153,10 @@ def start_thread():
156
153
allow_root=True,
157
154
token=cls.token,
158
155
)
+ if 'asyncio' in sys.modules:
+ app._init_asyncio_patch()
+ import asyncio
159
+ asyncio.set_event_loop(asyncio.new_event_loop())
160
# don't register signal handler during tests
161
app.init_signal = lambda : None
162
# clear log handlers and propagate to root for nose to capture it
0 commit comments