diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2023-11-12 11:35:31 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-12 11:35:31 (GMT) |
commit | 40752c1c1e8cec80e99a2c9796f4fde2f8b5d3e2 (patch) | |
tree | 6147225d24d9e629b8143a37f84ccc739314575d /Lib/test/test_inspect | |
parent | 12a30bc1aa0586308bf3fe12c915bcc5e54a032f (diff) | |
download | cpython-40752c1c1e8cec80e99a2c9796f4fde2f8b5d3e2.zip cpython-40752c1c1e8cec80e99a2c9796f4fde2f8b5d3e2.tar.gz cpython-40752c1c1e8cec80e99a2c9796f4fde2f8b5d3e2.tar.bz2 |
gh-112001: Fix test_builtins_have_signatures in test_inspect (GH-112002)
Diffstat (limited to 'Lib/test/test_inspect')
-rw-r--r-- | Lib/test/test_inspect/test_inspect.py | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/Lib/test/test_inspect/test_inspect.py b/Lib/test/test_inspect/test_inspect.py index 33eae85..bfafb0c 100644 --- a/Lib/test/test_inspect/test_inspect.py +++ b/Lib/test/test_inspect/test_inspect.py @@ -4733,19 +4733,14 @@ class TestSignatureDefinitions(unittest.TestCase): # These have unrepresentable parameter default values of NULL needs_null = {"anext"} no_signature |= needs_null - # These need PEP 457 groups or a signature change to accept None - needs_semantic_update = {"round"} - no_signature |= needs_semantic_update # These need *args support in Argument Clinic - needs_varargs = {"breakpoint", "min", "max", "print", - "__build_class__"} + needs_varargs = {"breakpoint", "min", "max", "__build_class__"} no_signature |= needs_varargs - # These simply weren't covered in the initial AC conversion - # for builtin callables - not_converted_yet = {"open", "__import__"} - no_signature |= not_converted_yet # These builtin types are expected to provide introspection info - types_with_signatures = set() + types_with_signatures = { + 'complex', 'enumerate', 'float', 'list', 'memoryview', 'object', + 'property', 'reversed', 'tuple', + } # Check the signatures we expect to be there ns = vars(builtins) for name, obj in sorted(ns.items()): @@ -4764,9 +4759,9 @@ class TestSignatureDefinitions(unittest.TestCase): # This ensures this test will start failing as more signatures are # added, so the affected items can be moved into the scope of the # regression test above - for name in no_signature: + for name in no_signature - needs_null: with self.subTest(builtin=name): - self.assertIsNone(obj.__text_signature__) + self.assertIsNone(ns[name].__text_signature__) def test_python_function_override_signature(self): def func(*args, **kwargs): |