summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_b1.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_b1.py')
-rw-r--r--Lib/test/test_b1.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/test/test_b1.py b/Lib/test/test_b1.py
index 6d6aa6f..9511079 100644
--- a/Lib/test/test_b1.py
+++ b/Lib/test/test_b1.py
@@ -39,6 +39,17 @@ apply(f1, (1,))
apply(f2, (1, 2))
apply(f3, (1, 2, 3))
+# A PyCFunction that takes only positional parameters should allow an
+# empty keyword dictionary to pass without a complaint, but raise a
+# TypeError if the dictionary is non-empty.
+apply(id, (1,), {})
+try:
+ apply(id, (1,), {"foo": 1})
+except TypeError:
+ pass
+else:
+ raise TestFailed, 'expected TypeError; no exception raised'
+
print 'callable'
if not callable(len):raise TestFailed, 'callable(len)'
def f(): pass