Skip to content

Commit 6b183b0

Browse files
committed
wait for async stop in test teardown
1 parent 2ca080c commit 6b183b0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ipyparallel/tests/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
"""toplevel setup/teardown for parallel tests."""
22
from __future__ import print_function
33

4+
import asyncio
45
import os
5-
import tempfile
66
import time
7-
from subprocess import PIPE
87
from subprocess import Popen
9-
from subprocess import STDOUT
108

119
from IPython.paths import get_ipython_dir
1210

@@ -125,7 +123,9 @@ def teardown():
125123
p = launchers.pop()
126124
if p.poll() is None:
127125
try:
128-
p.stop()
126+
f = p.stop()
127+
if f:
128+
asyncio.run(f)
129129
except Exception as e:
130130
print(e)
131131
pass

0 commit comments

Comments
 (0)