summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_builtin.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2020-07-06 23:30:46 (GMT)
committerGitHub <noreply@github.com>2020-07-06 23:30:46 (GMT)
commitb71ff9a5b6e60ee1209a04d2e0e58d9a2e341db3 (patch)
tree8c5825566ce701a3c98e14ed1d3e89fae6791125 /Lib/test/test_builtin.py
parent41db8ffc59566b8552f9cce4452ee8afad00aa63 (diff)
downloadcpython-b71ff9a5b6e60ee1209a04d2e0e58d9a2e341db3.zip
cpython-b71ff9a5b6e60ee1209a04d2e0e58d9a2e341db3.tar.gz
cpython-b71ff9a5b6e60ee1209a04d2e0e58d9a2e341db3.tar.bz2
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@gmail.com>
Diffstat (limited to 'Lib/test/test_builtin.py')
-rw-r--r--Lib/test/test_builtin.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/Lib/test/test_builtin.py b/Lib/test/test_builtin.py
index f47689d..4a49826 100644
--- a/Lib/test/test_builtin.py
+++ b/Lib/test/test_builtin.py
@@ -371,12 +371,14 @@ class BuiltinTest(unittest.TestCase):
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)