mirror of
https://github.com/python/cpython.git
synced 2026-01-07 16:02:55 +00:00
inspect.tests: Fix tests to work on python built with '--without-doc-strings' #20471
This commit is contained in:
parent
8c561b52b2
commit
145dff8567
1 changed files with 3 additions and 0 deletions
|
|
@ -2193,6 +2193,9 @@ def __init__(self, b):
|
|||
('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…
Add table
Add a link
Reference in a new issue