forked from M-Labs/artiq
test_rpctool: always create new asyncio event loop
This commit is contained in:
parent
3952954c12
commit
d19e70595a
|
@ -29,9 +29,9 @@ class TestRPCTool(unittest.TestCase):
|
||||||
def test_rpc(self):
|
def test_rpc(self):
|
||||||
if os.name == "nt":
|
if os.name == "nt":
|
||||||
loop = asyncio.ProactorEventLoop()
|
loop = asyncio.ProactorEventLoop()
|
||||||
asyncio.set_event_loop(loop)
|
|
||||||
else:
|
else:
|
||||||
loop = asyncio.get_event_loop()
|
loop = asyncio.new_event_loop()
|
||||||
|
asyncio.set_event_loop(loop)
|
||||||
try:
|
try:
|
||||||
loop.run_until_complete(self.do_test())
|
loop.run_until_complete(self.do_test())
|
||||||
finally:
|
finally:
|
||||||
|
|
Loading…
Reference in New Issue