8000 GH-95736: fix IsolatedAsyncioTestCase to set event loop before calling setup functions by kumaraditya303 · Pull Request #95898 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

GH-95736: fix IsolatedAsyncioTestCase to set event loop before calling setup functions #95898

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Aug 16, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
8000
Diff view
Diff view
Prev Previous commit
Next Next commit
add comment & simplify
  • Loading branch information
kumaraditya303 authored Aug 15, 2022
commit bf77bb67d8d5f1778111ab38fd4ec8a921a45ed1
3 changes: 2 additions & 1 deletion Lib/unittest/async_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ def _setupAsyncioRunner(self):
assert self._asyncioRunner is None, 'asyncio runner is already initialized'
runner = asyncio.Runner(debug=True)
self._asyncioRunner = runner
asyncio.set_event_loop(runner.get_loop())
# Force loop to be initialized
runner.get_loop()

def _tearDownAsyncioRunner(self):
runner = self._asyncioRunner
Expand Down
0