mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
Remove some now-obsolete generator future statements.
I left the email pkg alone; I'm not sure how Barry would like to handle that.
This commit is contained in:
parent
62f5a9d6c2
commit
496563a514
6 changed files with 5 additions and 19 deletions
|
@ -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")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue