diff options
author | Jakub Stasiak <jakub@stasiak.at> | 2017-10-05 07:10:09 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2017-10-05 07:10:09 (GMT) |
commit | af810b35b494ef1d255d4bf340b92a9dad446995 (patch) | |
tree | 78df02ecf9d934a174aa2ad1202d583b29faeba7 /Lib/lib2to3/tests | |
parent | a8ed11742b4c2115597977ce04fa8e043d9e0792 (diff) | |
download | cpython-af810b35b494ef1d255d4bf340b92a9dad446995.zip cpython-af810b35b494ef1d255d4bf340b92a9dad446995.tar.gz cpython-af810b35b494ef1d255d4bf340b92a9dad446995.tar.bz2 |
closes bpo-27494: Fix 2to3 handling of trailing comma after a generator expression (#3771)
Diffstat (limited to 'Lib/lib2to3/tests')
-rw-r--r-- | Lib/lib2to3/tests/test_parser.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/lib2to3/tests/test_parser.py b/Lib/lib2to3/tests/test_parser.py index 3f7ab97..2efcb80 100644 --- a/Lib/lib2to3/tests/test_parser.py +++ b/Lib/lib2to3/tests/test_parser.py @@ -459,6 +459,13 @@ class TestLiterals(GrammarTest): self.validate(s) +class TestGeneratorExpressions(GrammarTest): + + def test_trailing_comma_after_generator_expression_argument_works(self): + # BPO issue 27494 + self.validate("set(x for x in [],)") + + def diff(fn, result): try: with open('@', 'w') as f: |