mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #19674: inspect.signature() now produces a correct signature
for some builtins.
This commit is contained in:
parent
7fa6e1aeea
commit
44e2eaab54
18 changed files with 343 additions and 136 deletions
|
@ -1588,10 +1588,9 @@ class TestSignatureObject(unittest.TestCase):
|
|||
with self.assertRaisesRegex(ValueError, 'not supported by signature'):
|
||||
# support for 'method-wrapper'
|
||||
inspect.signature(min.__call__)
|
||||
with self.assertRaisesRegex(ValueError,
|
||||
'no signature found for builtin function'):
|
||||
# support for 'method-wrapper'
|
||||
inspect.signature(min)
|
||||
self.assertEqual(inspect.signature(min), None)
|
||||
signature = inspect.signature(os.stat)
|
||||
self.assertTrue(isinstance(signature, inspect.Signature))
|
||||
|
||||
def test_signature_on_non_function(self):
|
||||
with self.assertRaisesRegex(TypeError, 'is not a callable object'):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue