summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_descr.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-02-21 22:17:46 (GMT)
committerGeorg Brandl <georg@python.org>2006-02-21 22:17:46 (GMT)
commit6a29c323ba2080e7c5f394ce19e0516a6787a319 (patch)
treef3259521bcaf64a4e32dfbad0c68132c2695e0ef /Lib/test/test_descr.py
parentd02db4084e666b95aec7e042800319c6c77d825f (diff)
downloadcpython-6a29c323ba2080e7c5f394ce19e0516a6787a319.zip
cpython-6a29c323ba2080e7c5f394ce19e0516a6787a319.tar.gz
cpython-6a29c323ba2080e7c5f394ce19e0516a6787a319.tar.bz2
Add test for classmethod ./. keyword args.
Diffstat (limited to 'Lib/test/test_descr.py')
-rw-r--r--Lib/test/test_descr.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py
index d612766..2f12e96 100644
--- a/Lib/test/test_descr.py
+++ b/Lib/test/test_descr.py
@@ -1493,6 +1493,14 @@ def classmethods():
else:
raise TestFailed, "classmethod should check for callability"
+ # Verify that classmethod() doesn't allow keyword args
+ try:
+ classmethod(f, kw=1)
+ except TypeError:
+ pass
+ else:
+ raise TestFailed, "classmethod shouldn't accept keyword args"
+
def classmethods_in_c():
if verbose: print "Testing C-based class methods..."
import xxsubtype as spam