Commit 72bdc071 authored by Stefan Behnel's avatar Stefan Behnel

fix and extend error test after allowing new PEP 448 unpacking syntax

parent 6511e905
...@@ -7,16 +7,21 @@ args = (1,2,3) ...@@ -7,16 +7,21 @@ args = (1,2,3)
kwargs = {u"test" : "toast"} kwargs = {u"test" : "toast"}
def test(): def test():
# ok
f(1, 2, c=3, *args, d=5, **kwargs, **kwargs)
f(1, 2, c=3, *args, d=5, **kwargs, x=6)
f(1, 2, **kwargs, c=3)
f(1, 2, c=3, *args, *args, **kwargs)
f(*args, 1, 2, 3) f(*args, 1, 2, 3)
# errors
f(**kwargs, 1, 2, c=3) f(**kwargs, 1, 2, c=3)
f(*args, **kwargs, *args) f(*args, **kwargs, *args)
f(1, 2, c=3, *args, **kwargs, *args) f(1, 2, c=3, *args, **kwargs, *args)
f(1, 2, c=3, *args, d=5, **kwargs, **kwargs)
f(1, 2, c=3, *args, d=5, **kwargs, x=6)
f(1=2) f(1=2)
# too bad we don't get more errors here ... # too bad we don't get more errors here ...
_ERRORS = u""" _ERRORS = u"""
10:13: Non-keyword arg following star-arg 17:16: Non-keyword arg following keyword arg
""" """
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment