and a unit test for the staticmethod-of-a-non-method failure just fixed

This commit is contained in:
Anthony Baxter 2004-08-02 11:34:10 +00:00
parent 4e7785aa4f
commit 270fe88c68
1 changed files with 6 additions and 0 deletions

View File

@ -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')