mirror of https://github.com/python/cpython
Add another little test to make sure we roundtrip multiple list comp ifs ok.
Add tests for generator expressions too.
This commit is contained in:
parent
4b194fabdf
commit
d3a9162e5e
|
@ -51,6 +51,10 @@ class RoundtripLegalSyntaxTestCase(unittest.TestCase):
|
|||
self.check_expr("[1, 2, 3]")
|
||||
self.check_expr("[x**3 for x in range(20)]")
|
||||
self.check_expr("[x**3 for x in range(20) if x % 3]")
|
||||
self.check_expr("[x**3 for x in range(20) if x % 2 if x % 3]")
|
||||
self.check_expr("list(x**3 for x in range(20))")
|
||||
self.check_expr("list(x**3 for x in range(20) if x % 3)")
|
||||
self.check_expr("list(x**3 for x in range(20) if x % 2 if x % 3)")
|
||||
self.check_expr("foo(*args)")
|
||||
self.check_expr("foo(*args, **kw)")
|
||||
self.check_expr("foo(**kw)")
|
||||
|
|
Loading…
Reference in New Issue