We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 11f47f5 commit a0dfd8bCopy full SHA for a0dfd8b
tests/__init__.py
@@ -26,11 +26,10 @@ def allow_windows(test_method):
26
27
@wraps(test_method)
28
async def wrapped(self, *args, **kwargs):
29
- caller_id = 1234
30
- _ThreadedLoopAdapter.start(caller_id)
+ _ThreadedLoopAdapter.start(id(test_method))
31
coro = test_method(self, *args, **kwargs)
32
- asyncio.run_coroutine_threadsafe(coro=coro, loop=_ThreadedLoopAdapter._loop).result()
33
- _ThreadedLoopAdapter.stop(caller_id)
+ future = asyncio.run_coroutine_threadsafe(coro=coro, loop=_ThreadedLoopAdapter._loop)
+ return future.result()
34
35
return wrapped
36
0 commit comments