]> granicus.if.org Git - python/commitdiff
Add test for classmethod ./. keyword args.
authorGeorg Brandl <georg@python.org>
Tue, 21 Feb 2006 22:17:46 +0000 (22:17 +0000)
committerGeorg Brandl <georg@python.org>
Tue, 21 Feb 2006 22:17:46 +0000 (22:17 +0000)
Lib/test/test_descr.py

index d6127662e2fd459b05cffdca62eb02bf9fc85ed2..2f12e96bf41e7096f22740b4fca47fa760ce5b02 100644 (file)
@@ -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