inspect.tests: Fix tests to work on python built with '--without-doc-strings' #20471

This commit is contained in:
Yury Selivanov 2014-02-01 13:49:29 -05:00
parent 8c561b52b2
commit 145dff8567
1 changed files with 3 additions and 0 deletions

View File

@ -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)), '()')