mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
asyncio: Log an error if a Task is destroyed while it is still pending
This commit is contained in:
parent
4c945fe9e9
commit
a02f81ff17
4 changed files with 60 additions and 4 deletions
|
|
@ -244,7 +244,8 @@ class BaseEventLoopTests(test_utils.TestCase):
|
|||
@mock.patch('asyncio.base_events.logger')
|
||||
def test__run_once_logging(self, m_logger):
|
||||
def slow_select(timeout):
|
||||
time.sleep(1.0)
|
||||
# Sleep a bit longer than a second to avoid timer resolution issues.
|
||||
time.sleep(1.1)
|
||||
return []
|
||||
|
||||
# logging needs debug flag
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue