diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2023-11-13 07:13:49 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-13 07:13:49 (GMT) |
commit | 1d75ef6b6186619081c166b21c71c15b4f98beb8 (patch) | |
tree | fc512ad848602f6cb118671267fa8d71ed1ac5f3 /Lib/test/test_inspect | |
parent | d0058cbd1cd7e72307adab45759e1ea6adc05866 (diff) | |
download | cpython-1d75ef6b6186619081c166b21c71c15b4f98beb8.zip cpython-1d75ef6b6186619081c166b21c71c15b4f98beb8.tar.gz cpython-1d75ef6b6186619081c166b21c71c15b4f98beb8.tar.bz2 |
gh-111999: Add signatures and improve docstrings for builtins (GH-112000)
Diffstat (limited to 'Lib/test/test_inspect')
-rw-r--r-- | Lib/test/test_inspect/test_inspect.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Lib/test/test_inspect/test_inspect.py b/Lib/test/test_inspect/test_inspect.py index bfafb0c..becbb04 100644 --- a/Lib/test/test_inspect/test_inspect.py +++ b/Lib/test/test_inspect/test_inspect.py @@ -4734,12 +4734,13 @@ class TestSignatureDefinitions(unittest.TestCase): needs_null = {"anext"} no_signature |= needs_null # These need *args support in Argument Clinic - needs_varargs = {"breakpoint", "min", "max", "__build_class__"} + needs_varargs = {"min", "max", "__build_class__"} no_signature |= needs_varargs # These builtin types are expected to provide introspection info types_with_signatures = { - 'complex', 'enumerate', 'float', 'list', 'memoryview', 'object', - 'property', 'reversed', 'tuple', + 'bool', 'classmethod', 'complex', 'enumerate', 'filter', 'float', + 'frozenset', 'list', 'map', 'memoryview', 'object', 'property', + 'reversed', 'set', 'staticmethod', 'tuple', 'zip' } # Check the signatures we expect to be there ns = vars(builtins) @@ -4753,6 +4754,10 @@ class TestSignatureDefinitions(unittest.TestCase): if (name in no_signature): # Not yet converted continue + if name in {'classmethod', 'staticmethod'}: + # Bug gh-112006: inspect.unwrap() does not work with types + # with the __wrapped__ data descriptor. + continue with self.subTest(builtin=name): self.assertIsNotNone(inspect.signature(obj)) # Check callables that haven't been converted don't claim a signature |