diff options
| author | Yury Selivanov <yury@magic.io> | 2016-11-09 00:16:15 (GMT) |
|---|---|---|
| committer | Yury Selivanov <yury@magic.io> | 2016-11-09 00:16:15 (GMT) |
| commit | a054f40e84b924996f372ba10da969b6b05f77e6 (patch) | |
| tree | eb85c8340bbba9ee8ac822d86a5be171a14132ad /Lib/test | |
| parent | 692796a948ab67d75f7010e96b31885eefbd88e5 (diff) | |
| parent | 6cc495e9e2db8de0b8b7d95323d3a1514844b1b4 (diff) | |
| download | cpython-a054f40e84b924996f372ba10da969b6b05f77e6.zip cpython-a054f40e84b924996f372ba10da969b6b05f77e6.tar.gz cpython-a054f40e84b924996f372ba10da969b6b05f77e6.tar.bz2 | |
Merge 3.5 (asyncio)
Diffstat (limited to 'Lib/test')
| -rw-r--r-- | Lib/test/test_asyncio/test_events.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py index d6489d5..5b32332 100644 --- a/Lib/test/test_asyncio/test_events.py +++ b/Lib/test/test_asyncio/test_events.py @@ -2384,8 +2384,6 @@ class HandleTests(test_utils.TestCase): # (such as ones compiled with Cython). class Coro: - __name__ = 'AAA' - def send(self, v): pass @@ -2399,6 +2397,7 @@ class HandleTests(test_utils.TestCase): pass coro = Coro() + coro.__name__ = 'AAA' self.assertTrue(asyncio.iscoroutine(coro)) self.assertEqual(coroutines._format_coroutine(coro), 'AAA()') @@ -2408,6 +2407,11 @@ class HandleTests(test_utils.TestCase): coro.cr_running = True self.assertEqual(coroutines._format_coroutine(coro), 'BBB() running') + coro = Coro() + # Some coroutines might not have '__name__', such as + # built-in async_gen.asend(). + self.assertEqual(coroutines._format_coroutine(coro), 'Coro()') + class TimerTests(unittest.TestCase): |
