Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 40752c1

Browse filesBrowse files
gh-112001: Fix test_builtins_have_signatures in test_inspect (GH-112002)
1 parent 12a30bc commit 40752c1
Copy full SHA for 40752c1

File tree

Expand file treeCollapse file tree

1 file changed

+7
-12
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-12
lines changed

‎Lib/test/test_inspect/test_inspect.py

Copy file name to clipboardExpand all lines: Lib/test/test_inspect/test_inspect.py
+7-12Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4733,19 +4733,14 @@ def test_builtins_have_signatures(self):
47334733
# These have unrepresentable parameter default values of NULL
47344734
needs_null = {"anext"}
47354735
no_signature |= needs_null
4736-
# These need PEP 457 groups or a signature change to accept None
4737-
needs_semantic_update = {"round"}
4738-
no_signature |= needs_semantic_update
47394736
# These need *args support in Argument Clinic
4740-
needs_varargs = {"breakpoint", "min", "max", "print",
4741-
"__build_class__"}
4737+
needs_varargs = {"breakpoint", "min", "max", "__build_class__"}
47424738
no_signature |= needs_varargs
4743-
# These simply weren't covered in the initial AC conversion
4744-
# for builtin callables
4745-
not_converted_yet = {"open", "__import__"}
4746-
no_signature |= not_converted_yet
47474739
# These builtin types are expected to provide introspection info
4748-
types_with_signatures = set()
4740+
types_with_signatures = {
4741+
'complex', 'enumerate', 'float', 'list', 'memoryview', 'object',
4742+
'property', 'reversed', 'tuple',
4743+
}
47494744
# Check the signatures we expect to be there
47504745
ns = vars(builtins)
47514746
for name, obj in sorted(ns.items()):
@@ -4764,9 +4759,9 @@ def test_builtins_have_signatures(self):
47644759
# This ensures this test will start failing as more signatures are
47654760
# added, so the affected items can be moved into the scope of the
47664761
# regression test above
4767-
for name in no_signature:
4762+
for name in no_signature - needs_null:
47684763
with self.subTest(builtin=name):
4769-
self.assertIsNone(obj.__text_signature__)
4764+
self.assertIsNone(ns[name].__text_signature__)
47704765

47714766
def test_python_function_override_signature(self):
47724767
def func(*args, **kwargs):

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.