Skip to content

Commit

Permalink
Make test_await more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
kngwyu committed Jun 17, 2020
1 parent fc3fa70 commit da381e5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/test_dunder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,9 @@ async def main():
# but we see still errors on Github actions...
if sys.platform == "win32" and sys.version_info >= (3, 8, 0):
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
loop = asyncio.get_event_loop()
# get_event_loop can cause error: see https://github.com/PyO3/pyo3/pull/961#issuecomment-645238579
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
assert loop.run_until_complete(main()) is None
loop.close()
"#
Expand Down

0 comments on commit da381e5

Please sign in to comment.