summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-09-17 21:24:39 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2014-09-17 21:24:39 (GMT)
commit605a64b4360c552b20fc74d1ab51dd5bdd98e1ae (patch)
tree9252cadb0b4eb611c5997403128f0e0d2f95da64 /Lib/test
parentdc41440401b7c66271bf03c80aada942422a38bb (diff)
parent1b38bc65ddc337101cf0b1b02c67a9a6742b0438 (diff)
downloadcpython-605a64b4360c552b20fc74d1ab51dd5bdd98e1ae.zip
cpython-605a64b4360c552b20fc74d1ab51dd5bdd98e1ae.tar.gz
cpython-605a64b4360c552b20fc74d1ab51dd5bdd98e1ae.tar.bz2
(Merge 3.4) asyncio, Tulip issue 206: In debug mode, keep the callback in the
representation of Handle and TimerHandle after cancel().
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_asyncio/test_events.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py
index 02cdbdc..258fdcb 100644
--- a/Lib/test/test_asyncio/test_events.py
+++ b/Lib/test/test_asyncio/test_events.py
@@ -1891,8 +1891,8 @@ class HandleTests(test_utils.TestCase):
# cancelled handle
h.cancel()
self.assertEqual(repr(h),
- '<Handle cancelled created at %s:%s>'
- % (create_filename, create_lineno))
+ '<Handle cancelled noop(1, 2) at %s:%s created at %s:%s>'
+ % (filename, lineno, create_filename, create_lineno))
def test_handle_source_traceback(self):
loop = asyncio.get_event_loop_policy().new_event_loop()
@@ -1987,8 +1987,9 @@ class TimerTests(unittest.TestCase):
# cancelled handle
h.cancel()
self.assertEqual(repr(h),
- '<TimerHandle cancelled when=123 created at %s:%s>'
- % (create_filename, create_lineno))
+ '<TimerHandle cancelled when=123 noop() '
+ 'at %s:%s created at %s:%s>'
+ % (filename, lineno, create_filename, create_lineno))
def test_timer_comparison(self):