summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Lib/test/test_decorators.py6
1 files changed, 6 insertions, 0 deletions
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')