https://github.com/python/cpython/commit/7c70cc5c23971ef448ea59827c6e6ae310157356
commit: 7c70cc5c23971ef448ea59827c6e6ae310157356
branch: main
author: sobolevn <[email protected]>
committer: sobolevn <[email protected]>
date: 2025-10-06T19:48:50+03:00
summary:
gh-133210: Fix `test_inspect` without docstrings (#139651)
files:
M Lib/test/test_inspect/test_inspect.py
diff --git a/Lib/test/test_inspect/test_inspect.py
b/Lib/test/test_inspect/test_inspect.py
index 555efb78dcc6aa..e32e34c63b5324 100644
--- a/Lib/test/test_inspect/test_inspect.py
+++ b/Lib/test/test_inspect/test_inspect.py
@@ -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'):
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]