summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio/test_tasks.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-07-11 09:58:33 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2014-07-11 09:58:33 (GMT)
commit770e48d0174726e339074cfffa68fce23768aab5 (patch)
tree807e997af92d392c29b5e060588460d42d3aec00 /Lib/test/test_asyncio/test_tasks.py
parent3740d589f7e1737da480b2730161cb835b8dd55c (diff)
downloadcpython-770e48d0174726e339074cfffa68fce23768aab5.zip
cpython-770e48d0174726e339074cfffa68fce23768aab5.tar.gz
cpython-770e48d0174726e339074cfffa68fce23768aab5.tar.bz2
asyncio: sync with Tulip
* Tulip issue #182: Improve logs of BaseEventLoop._run_once() - Don't log non-blocking poll - Only log polling with a timeout if it gets events or if it timed out after more than 1 second. * Fix some pyflakes warnings: remove unused imports
Diffstat (limited to 'Lib/test/test_asyncio/test_tasks.py')
-rw-r--r--Lib/test/test_asyncio/test_tasks.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/Lib/test/test_asyncio/test_tasks.py b/Lib/test/test_asyncio/test_tasks.py
index 85648dc..ca770f9 100644
--- a/Lib/test/test_asyncio/test_tasks.py
+++ b/Lib/test/test_asyncio/test_tasks.py
@@ -1,6 +1,5 @@
"""Tests for tasks.py."""
-import os.path
import re
import sys
import types
@@ -1640,9 +1639,9 @@ class TaskTests(test_utils.TestCase):
asyncio.coroutines._DEBUG = debug
tb_filename = __file__
- tb_lineno = sys._getframe().f_lineno + 1
- coro = coro_noop()
- coro = None
+ tb_lineno = sys._getframe().f_lineno + 2
+ # create a coroutine object but don't use it
+ coro_noop()
support.gc_collect()
self.assertTrue(m_log.error.called)
@@ -1652,7 +1651,7 @@ class TaskTests(test_utils.TestCase):
r'Coroutine object created at \(most recent call last\):\n'
r'.*\n'
r' File "%s", line %s, in test_coroutine_never_yielded\n'
- r' coro = coro_noop\(\)$'
+ r' coro_noop\(\)$'
% (re.escape(coro_noop.__qualname__),
re.escape(func_filename), func_lineno,
re.escape(tb_filename), tb_lineno))