summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2015-07-03 04:35:02 (GMT)
committerYury Selivanov <yselivanov@sprymix.com>2015-07-03 04:35:02 (GMT)
commit53e623075dbcba2afaffc859c2fae9bff48e9abf (patch)
tree16826cf2473cbd2f1a943ae1c8ef9265b8833ecd /Lib/test
parente13f8f3cabda31742beba3dc9e5e170d7bbdbb88 (diff)
downloadcpython-53e623075dbcba2afaffc859c2fae9bff48e9abf.zip
cpython-53e623075dbcba2afaffc859c2fae9bff48e9abf.tar.gz
cpython-53e623075dbcba2afaffc859c2fae9bff48e9abf.tar.bz2
Issue #24450: Proxy cr_await and gi_yieldfrom in @types.coroutine
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_types.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/test/test_types.py b/Lib/test/test_types.py
index e283f32..ba8a1b9 100644
--- a/Lib/test/test_types.py
+++ b/Lib/test/test_types.py
@@ -1295,8 +1295,8 @@ class CoroutineTests(unittest.TestCase):
self.assertIs(wrapper.__name__, gen.__name__)
# Test AttributeErrors
- for name in {'gi_running', 'gi_frame', 'gi_code',
- 'cr_running', 'cr_frame', 'cr_code'}:
+ for name in {'gi_running', 'gi_frame', 'gi_code', 'gi_yieldfrom',
+ 'cr_running', 'cr_frame', 'cr_code', 'cr_await'}:
with self.assertRaises(AttributeError):
getattr(wrapper, name)
@@ -1304,12 +1304,15 @@ class CoroutineTests(unittest.TestCase):
gen.gi_running = object()
gen.gi_frame = object()
gen.gi_code = object()
+ gen.gi_yieldfrom = object()
self.assertIs(wrapper.gi_running, gen.gi_running)
self.assertIs(wrapper.gi_frame, gen.gi_frame)
self.assertIs(wrapper.gi_code, gen.gi_code)
+ self.assertIs(wrapper.gi_yieldfrom, gen.gi_yieldfrom)
self.assertIs(wrapper.cr_running, gen.gi_running)
self.assertIs(wrapper.cr_frame, gen.gi_frame)
self.assertIs(wrapper.cr_code, gen.gi_code)
+ self.assertIs(wrapper.cr_await, gen.gi_yieldfrom)
wrapper.close()
gen.close.assert_called_once_with()