[Python-checkins] r42546 - python/trunk/Lib/test/test_descr.py

georg.brandl python-checkins at python.org
Tue Feb 21 23:17:46 CET 2006


Author: georg.brandl
Date: Tue Feb 21 23:17:46 2006
New Revision: 42546

Modified:
   python/trunk/Lib/test/test_descr.py
Log:
Add test for classmethod ./. keyword args.



Modified: python/trunk/Lib/test/test_descr.py
==============================================================================
--- python/trunk/Lib/test/test_descr.py	(original)
+++ python/trunk/Lib/test/test_descr.py	Tue Feb 21 23:17:46 2006
@@ -1493,6 +1493,14 @@
     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


More information about the Python-checkins mailing list