[Python-checkins] bpo-41218: Improve the test cases for test_compile_top_level_await_no_coro (GH-21363)
Miss Islington (bot)
webhook-mailer at python.org
Mon Jul 6 19:30:54 EDT 2020
https://github.com/python/cpython/commit/b71ff9a5b6e60ee1209a04d2e0e58d9a2e341db3
commit: b71ff9a5b6e60ee1209a04d2e0e58d9a2e341db3
branch: 3.8
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2020-07-06T16:30:46-07:00
summary:
bpo-41218: Improve the test cases for test_compile_top_level_await_no_coro (GH-21363)
(cherry picked from commit c2c1f1f906cdeb40576880d4b6a4f8fcbc016eb8)
Co-authored-by: Pablo Galindo <Pablogsal at gmail.com>
files:
M Lib/test/test_builtin.py
diff --git a/Lib/test/test_builtin.py b/Lib/test/test_builtin.py
index f47689dfdea41..4a498262ba637 100644
--- a/Lib/test/test_builtin.py
+++ b/Lib/test/test_builtin.py
@@ -371,12 +371,14 @@ def f(): """doc"""
self.assertEqual(rv, tuple(expected))
def test_compile_top_level_await_no_coro(self):
- """Make sure top level non-await codes get the correct coroutine flags.
- """
+ """Make sure top level non-await codes get the correct coroutine flags"""
modes = ('single', 'exec')
code_samples = [
'''def f():pass\n''',
- '''[x for x in l]'''
+ '''[x for x in l]''',
+ '''{x for x in l}''',
+ '''(x for x in l)''',
+ '''{x:x for x in l}''',
]
for mode, code_sample in product(modes, code_samples):
source = dedent(code_sample)
More information about the Python-checkins
mailing list