mirror of
https://github.com/python/cpython.git
synced 2026-01-05 23:12:38 +00:00
[3.14] gh-133210: Fix test_inspect without docstrings (GH-139651) (#139776)
gh-133210: Fix `test_inspect` without docstrings (GH-139651)
(cherry picked from commit 7c70cc5c23)
Co-authored-by: sobolevn <mail@sobolevn.me>
This commit is contained in:
parent
b5230d73a9
commit
d8bdc1e6f7
1 changed files with 8 additions and 2 deletions
|
|
@ -4261,8 +4261,14 @@ def __init__(self, a):
|
|||
|
||||
self.assertEqual(self.signature(C, follow_wrapped=False),
|
||||
varargs_signature)
|
||||
self.assertEqual(self.signature(C.__new__, follow_wrapped=False),
|
||||
varargs_signature)
|
||||
if support.MISSING_C_DOCSTRINGS:
|
||||
self.assertRaisesRegex(
|
||||
ValueError, "no signature found",
|
||||
self.signature, C.__new__, follow_wrapped=False,
|
||||
)
|
||||
else:
|
||||
self.assertEqual(self.signature(C.__new__, follow_wrapped=False),
|
||||
varargs_signature)
|
||||
|
||||
def test_signature_on_class_with_wrapped_new(self):
|
||||
with self.subTest('FunctionType'):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue