diff options
author | Pablo Galindo <Pablogsal@gmail.com> | 2019-05-18 22:40:22 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-18 22:40:22 (GMT) |
commit | da6129e821099c1372d511a11d18af83d6d5d128 (patch) | |
tree | aaeab4fe509a089fb2937aca046e1de338f31971 /Lib | |
parent | fa19a25c238d0769e6a5aa63ce05133d66043556 (diff) | |
download | cpython-da6129e821099c1372d511a11d18af83d6d5d128.zip cpython-da6129e821099c1372d511a11d18af83d6d5d128.tar.gz cpython-da6129e821099c1372d511a11d18af83d6d5d128.tar.bz2 |
bpo-36961: Handle positional-only arguments in uparse.c (GH-13412)
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_future.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Lib/test/test_future.py b/Lib/test/test_future.py index cd320a2..dd148b6 100644 --- a/Lib/test/test_future.py +++ b/Lib/test/test_future.py @@ -183,6 +183,18 @@ class AnnotationsFutureTestCase(unittest.TestCase): eq('lambda a, b, c=True: a') eq("lambda a, b, c=True, *, d=1 << v2, e='str': a") eq("lambda a, b, c=True, *vararg, d, e='str', **kwargs: a + b") + eq("lambda a, /, b, c=True, *vararg, d, e='str', **kwargs: a + b") + eq('lambda x, /: x') + eq('lambda x=1, /: x') + eq('lambda x, /, y: x + y') + eq('lambda x=1, /, y=2: x + y') + eq('lambda x, /, y=1: x + y') + eq('lambda x, /, y=1, *, z=3: x + y + z') + eq('lambda x=1, /, y=2, *, z=3: x + y + z') + eq('lambda x=1, /, y=2, *, z: x + y + z') + eq('lambda x=1, y=2, z=3, /, w=4, *, l, l2: x + y + z + w + l + l2') + eq('lambda x=1, y=2, z=3, /, w=4, *, l, l2, **kwargs: x + y + z + w + l + l2') + eq('lambda x, /, y=1, *, z: x + y + z') eq('lambda x: lambda y: x + y') eq('1 if True else 2') eq('str or None if int or True else str or bytes or None') |