summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPablo Galindo <Pablogsal@gmail.com>2020-07-06 22:30:14 (GMT)
committerGitHub <noreply@github.com>2020-07-06 22:30:14 (GMT)
commitc2c1f1f906cdeb40576880d4b6a4f8fcbc016eb8 (patch)
tree010877d61a5d97c6c42d67411a1480ec8b0f26d5
parentbd46174a5a09a54e5ae1077909f923f56a7cf710 (diff)
downloadcpython-c2c1f1f906cdeb40576880d4b6a4f8fcbc016eb8.zip
cpython-c2c1f1f906cdeb40576880d4b6a4f8fcbc016eb8.tar.gz
cpython-c2c1f1f906cdeb40576880d4b6a4f8fcbc016eb8.tar.bz2
bpo-41218: Improve the test cases for test_compile_top_level_await_no_coro (GH-21363)
-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 3dcdf8d..3bc1a3e 100644
--- a/Lib/test/test_builtin.py
+++ b/Lib/test/test_builtin.py
@@ -372,12 +372,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)