diff options
author | Anthony Baxter <anthonybaxter@gmail.com> | 2004-08-02 11:34:10 (GMT) |
---|---|---|
committer | Anthony Baxter <anthonybaxter@gmail.com> | 2004-08-02 11:34:10 (GMT) |
commit | 270fe88c68d692fbbdae434e9db941f7d8530f9b (patch) | |
tree | 61c6e85e3974b7da7047cfeab57d5f6a14c68877 /Lib | |
parent | 4e7785aa4fd8da93ca28c2e7a2b36a167d32b877 (diff) | |
download | cpython-270fe88c68d692fbbdae434e9db941f7d8530f9b.zip cpython-270fe88c68d692fbbdae434e9db941f7d8530f9b.tar.gz cpython-270fe88c68d692fbbdae434e9db941f7d8530f9b.tar.bz2 |
and a unit test for the staticmethod-of-a-non-method failure just fixed
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_decorators.py | 6 |
1 files changed, 6 insertions, 0 deletions
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') |