From: Georg Brandl Date: Tue, 21 Feb 2006 22:17:46 +0000 (+0000) Subject: Add test for classmethod ./. keyword args. X-Git-Tag: v2.5a0~556 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6a29c323ba2080e7c5f394ce19e0516a6787a319;p=python Add test for classmethod ./. keyword args. --- diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py index d6127662e2..2f12e96bf4 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