From 270fe88c68d692fbbdae434e9db941f7d8530f9b Mon Sep 17 00:00:00 2001 From: Anthony Baxter Date: Mon, 2 Aug 2004 11:34:10 +0000 Subject: and a unit test for the staticmethod-of-a-non-method failure just fixed --- Lib/test/test_decorators.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Lib/test/test_decorators.py b/Lib/test/test_decorators.py index 98d5d3e..ef40e17 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') -- cgit v0.12