asyncio: Log an error if a Task is destroyed while it is still pending

This commit is contained in:
Victor Stinner 2014-06-24 22:37:53 +02:00
parent 4c945fe9e9
commit a02f81ff17
4 changed files with 60 additions and 4 deletions

View file

@ -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