diff options
Diffstat (limited to 'Lib/test/test_parser.py')
-rw-r--r-- | Lib/test/test_parser.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/Lib/test/test_parser.py b/Lib/test/test_parser.py index 966f3e9..5df1e46 100644 --- a/Lib/test/test_parser.py +++ b/Lib/test/test_parser.py @@ -27,14 +27,10 @@ class RoundtripLegalSyntaxTestCase(unittest.TestCase): self.roundtrip(parser.suite, s) def test_yield_statement(self): - self.check_suite("from __future__ import generators\n" - "def f(): yield 1") - self.check_suite("from __future__ import generators\n" - "def f(): return; yield 1") - self.check_suite("from __future__ import generators\n" - "def f(): yield 1; return") - self.check_suite("from __future__ import generators\n" - "def f():\n" + self.check_suite("def f(): yield 1") + self.check_suite("def f(): return; yield 1") + self.check_suite("def f(): yield 1; return") + self.check_suite("def f():\n" " for x in range(30):\n" " yield x\n") |