diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-10-02 11:06:43 +0300 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-10-02 11:06:43 +0300 |
commit | e036ef8fa29f27d57fe9f8cef8d931d4122d8223 (patch) | |
tree | b3d48b866f7339d7577f68529326fba4856b821e /Lib/test/test_extcall.py | |
parent | 0a3beffc8f6483da16523fceb9158af6a259a608 (diff) | |
download | cpython-git-e036ef8fa29f27d57fe9f8cef8d931d4122d8223.tar.gz |
Issue #27358: Optimized merging var-keyword arguments and improved error
message when pass a non-mapping as a var-keyword argument.
Diffstat (limited to 'Lib/test/test_extcall.py')
-rw-r--r-- | Lib/test/test_extcall.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Lib/test/test_extcall.py b/Lib/test/test_extcall.py index 96f3ede9a3..043df01311 100644 --- a/Lib/test/test_extcall.py +++ b/Lib/test/test_extcall.py @@ -259,6 +259,31 @@ not function ... TypeError: h() argument after ** must be a mapping, not function + >>> h(**[]) + Traceback (most recent call last): + ... + TypeError: h() argument after ** must be a mapping, not list + + >>> h(a=1, **h) + Traceback (most recent call last): + ... + TypeError: h() argument after ** must be a mapping, not function + + >>> h(a=1, **[]) + Traceback (most recent call last): + ... + TypeError: h() argument after ** must be a mapping, not list + + >>> h(**{'a': 1}, **h) + Traceback (most recent call last): + ... + TypeError: h() argument after ** must be a mapping, not function + + >>> h(**{'a': 1}, **[]) + Traceback (most recent call last): + ... + TypeError: h() argument after ** must be a mapping, not list + >>> dir(**h) Traceback (most recent call last): ... |