inspect.tests: Fix tests to work on python built with '--without-doc-strings' #20471
This commit is contained in:
parent
8c561b52b2
commit
145dff8567
|
@ -2193,6 +2193,9 @@ class TestSignatureObject(unittest.TestCase):
|
|||
('bar', 2, ..., "keyword_only")),
|
||||
...))
|
||||
|
||||
@unittest.skipIf(MISSING_C_DOCSTRINGS,
|
||||
"Signature information for builtins requires docstrings")
|
||||
def test_signature_on_class_without_init(self):
|
||||
# Test classes without user-defined __init__ or __new__
|
||||
class C: pass
|
||||
self.assertEqual(str(inspect.signature(C)), '()')
|
||||
|
|
Loading…
Reference in New Issue