From: Anthony Baxter Date: Mon, 2 Aug 2004 11:34:10 +0000 (+0000) Subject: and a unit test for the staticmethod-of-a-non-method failure just fixed X-Git-Tag: v2.4a2~70 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=270fe88c68d692fbbdae434e9db941f7d8530f9b;p=python and a unit test for the staticmethod-of-a-non-method failure just fixed --- diff --git a/Lib/test/test_decorators.py b/Lib/test/test_decorators.py index 98d5d3eff7..ef40e17fad 100644 --- a/Lib/test/test_decorators.py +++ b/Lib/test/test_decorators.py @@ -78,6 +78,12 @@ class TestDecorators(unittest.TestCase): self.assertEqual(C.foo(), 42) self.assertEqual(C().foo(), 42) + def test_staticmethod_function(self): + @staticmethod + def notamethod(x): + return x + self.assertRaises(TypeError, notamethod, 1) + def test_dotted(self): decorators = MiscDecorators() @decorators.author('Cleese')