mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
inspect: Fix getfullargspec to support builtin module-level functions. Issue #20711
This commit is contained in:
parent
b226026299
commit
8c185ee12e
2 changed files with 16 additions and 2 deletions
|
|
@ -643,6 +643,13 @@ class TestClassesAndFunctions(unittest.TestCase):
|
|||
self.assertFullArgSpecEquals(_pickle.Pickler(io.BytesIO()).dump,
|
||||
args_e=['self', 'obj'], formatted='(self, obj)')
|
||||
|
||||
self.assertFullArgSpecEquals(
|
||||
os.stat,
|
||||
args_e=['path'],
|
||||
kwonlyargs_e=['dir_fd', 'follow_symlinks'],
|
||||
kwonlydefaults_e={'dir_fd': None, 'follow_symlinks': True},
|
||||
formatted='(path, *, dir_fd=None, follow_symlinks=True)')
|
||||
|
||||
@cpython_only
|
||||
@unittest.skipIf(MISSING_C_DOCSTRINGS,
|
||||
"Signature information for builtins requires docstrings")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue