summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_new.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_new.py')
-rw-r--r--Lib/test/test_new.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_new.py b/Lib/test/test_new.py
index 3c16bf5..e90fd66 100644
--- a/Lib/test/test_new.py
+++ b/Lib/test/test_new.py
@@ -47,6 +47,14 @@ except TypeError:
else:
raise TestFailed, "dangerous instance method creation allowed"
+# Verify that instancemethod() doesn't allow keyword args
+try:
+ new.instancemethod(break_yolks, c, kw=1)
+except TypeError:
+ pass
+else:
+ raise TestFailed, "instancemethod shouldn't accept keyword args"
+
# It's unclear what the semantics should be for a code object compiled at
# module scope, but bound and run in a function. In CPython, `c' is global
# (by accident?) while in Jython, `c' is local. The intent of the test