mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Teach the parsermodule about floor division. Fixes
[ 676521 ] parser module validation failure bugfix candidate.
This commit is contained in:
parent
090da4b626
commit
5e83b7a9cc
2 changed files with 7 additions and 0 deletions
|
@ -51,6 +51,10 @@ class RoundtripLegalSyntaxTestCase(unittest.TestCase):
|
|||
self.check_expr("foo(a, b, c, *args, **kw)")
|
||||
self.check_expr("foo(a, b, c, **kw)")
|
||||
self.check_expr("foo + bar")
|
||||
self.check_expr("foo - bar")
|
||||
self.check_expr("foo * bar")
|
||||
self.check_expr("foo / bar")
|
||||
self.check_expr("foo // bar")
|
||||
self.check_expr("lambda: 0")
|
||||
self.check_expr("lambda x: 0")
|
||||
self.check_expr("lambda *y: 0")
|
||||
|
@ -85,6 +89,7 @@ class RoundtripLegalSyntaxTestCase(unittest.TestCase):
|
|||
self.check_suite("a -= b")
|
||||
self.check_suite("a *= b")
|
||||
self.check_suite("a /= b")
|
||||
self.check_suite("a //= b")
|
||||
self.check_suite("a %= b")
|
||||
self.check_suite("a &= b")
|
||||
self.check_suite("a |= b")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue