mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
and a unit test for the staticmethod-of-a-non-method failure just fixed
This commit is contained in:
parent
4e7785aa4f
commit
270fe88c68
1 changed files with 6 additions and 0 deletions
|
@ -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')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue