mirror of
https://github.com/python/cpython.git
synced 2025-10-17 20:28:43 +00:00
bpo-39191: Fix RuntimeWarning in asyncio test (GH-17863)
https://bugs.python.org/issue39191
This commit is contained in:
parent
ca94677a62
commit
10ac0cded2
2 changed files with 9 additions and 5 deletions
|
@ -259,8 +259,12 @@ class EventLoopTestsMixin:
|
|||
self.assertTrue(self.loop.is_running())
|
||||
self.loop.run_until_complete(coro1())
|
||||
|
||||
self.assertRaises(
|
||||
RuntimeError, self.loop.run_until_complete, coro2())
|
||||
with self.assertWarnsRegex(
|
||||
RuntimeWarning,
|
||||
r"coroutine \S+ was never awaited"
|
||||
):
|
||||
self.assertRaises(
|
||||
RuntimeError, self.loop.run_until_complete, coro2())
|
||||
|
||||
# Note: because of the default Windows timing granularity of
|
||||
# 15.6 msec, we use fairly long sleep times here (~100 msec).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue