add multiple values for keyword type error detection

This commit is contained in:
Dave Halter
2014-05-26 18:40:02 +02:00
parent 720907531b
commit f3e986a285
4 changed files with 19 additions and 11 deletions

View File

@@ -14,7 +14,7 @@ simple(1, 2)
def nested(*args):
# TODO: shoult not be her but in line 17
# TODO: should not be here, but in line 17
#! 13 type-error-too-few-arguments
return simple(*args)
@@ -41,9 +41,7 @@ def two_params(x, y):
two_params(y=2, x=1)
two_params(1, y=2)
# The next two statements should generate errors. Basically it should generate
# something like `TypeError: x() got multiple values for keyword argument 'a'`.
# For now however, any error should be fine.
#! 10 type-error-multiple-values
two_params(1, x=2)
#! 17 type-error-too-many-arguments
two_params(1, 2, y=3)