nicer error message for invalid function arguments

This commit is contained in:
Wenzel Jakob
2016-09-12 11:44:37 +09:00
parent b3794f1087
commit e99ebaedcf
6 changed files with 24 additions and 16 deletions

View File

@@ -35,9 +35,10 @@ def test_named_arguments(msg):
# noinspection PyArgumentList
kw_func2(x=5, y=10, z=12)
assert msg(excinfo.value) == """
Incompatible function arguments. The following argument types are supported:
kw_func2(): incompatible function arguments. The following argument types are supported:
1. (x: int=100, y: int=200) -> str
Invoked with:
Invoked with:
"""
assert kw_func4() == "{13 17}"