diff options
| author | Yury Selivanov <yselivanov@sprymix.com> | 2014-01-29 12:18:59 -0500 |
|---|---|---|
| committer | Yury Selivanov <yselivanov@sprymix.com> | 2014-01-29 12:18:59 -0500 |
| commit | 0486f819c93de81120ad75570df5d6837017c03d (patch) | |
| tree | 452ef5711eb8c11a3a19b0993f84d2d11523018d /Lib/test | |
| parent | c45873e4349fcec76870757b43fe24a85b443755 (diff) | |
| download | cpython-git-0486f819c93de81120ad75570df5d6837017c03d.tar.gz | |
inspect.signature: Make sure that if a callable object has '_patialmethod'
attribute, that attribute is an instance of 'functools.partialmethod'.
Diffstat (limited to 'Lib/test')
| -rw-r--r-- | Lib/test/test_inspect.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_inspect.py b/Lib/test/test_inspect.py index 19ccbcba65..f06b5b4ff4 100644 --- a/Lib/test/test_inspect.py +++ b/Lib/test/test_inspect.py @@ -1983,6 +1983,11 @@ class TestSignatureObject(unittest.TestCase): ('c', 1, ..., 'keyword_only')), 'spam')) + def test_signature_on_fake_partialmethod(self): + def foo(a): pass + foo._partialmethod = 'spam' + self.assertEqual(str(inspect.signature(foo)), '(a)') + def test_signature_on_decorated(self): import functools |
