From: Pablo Galindo Date: Mon, 6 Jul 2020 22:30:14 +0000 (+0100) Subject: bpo-41218: Improve the test cases for test_compile_top_level_await_no_coro (GH-21363) X-Git-Tag: v3.10.0a1~431 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c2c1f1f906cdeb40576880d4b6a4f8fcbc016eb8;p=thirdparty%2FPython%2Fcpython.git bpo-41218: Improve the test cases for test_compile_top_level_await_no_coro (GH-21363) --- diff --git a/Lib/test/test_builtin.py b/Lib/test/test_builtin.py index 3dcdf8d90305..3bc1a3e246fd 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)