diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2023-12-23 09:56:30 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-23 09:56:30 (GMT) |
commit | 4e5b27e6a3be85853bd04d45128dd7cc706bb1c8 (patch) | |
tree | 2b82e7eaaff8888196988d7e6f147ca4f159d426 /Lib/idlelib | |
parent | c3f92f6a7513340dfe2d82bfcd38eb77453e935d (diff) | |
download | cpython-4e5b27e6a3be85853bd04d45128dd7cc706bb1c8.zip cpython-4e5b27e6a3be85853bd04d45128dd7cc706bb1c8.tar.gz cpython-4e5b27e6a3be85853bd04d45128dd7cc706bb1c8.tar.bz2 |
gh-81682: Fix test failures when CPython is built without docstrings (GH-113410)
Diffstat (limited to 'Lib/idlelib')
-rw-r--r-- | Lib/idlelib/idle_test/test_calltip.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/idlelib/idle_test/test_calltip.py b/Lib/idlelib/idle_test/test_calltip.py index 1ccb63b..15e1ff3 100644 --- a/Lib/idlelib/idle_test/test_calltip.py +++ b/Lib/idlelib/idle_test/test_calltip.py @@ -7,6 +7,7 @@ import textwrap import types import re from idlelib.idle_test.mock_tk import Text +from test.support import MISSING_C_DOCSTRINGS # Test Class TC is used in multiple get_argspec test methods @@ -50,6 +51,8 @@ class Get_argspecTest(unittest.TestCase): # but a red buildbot is better than a user crash (as has happened). # For a simple mismatch, change the expected output to the actual. + @unittest.skipIf(MISSING_C_DOCSTRINGS, + "Signature information for builtins requires docstrings") def test_builtins(self): def tiptest(obj, out): @@ -143,6 +146,8 @@ you\'ll probably have to override _wrap_chunks().''') f.__doc__ = 'a'*300 self.assertEqual(get_spec(f), f"()\n{'a'*(calltip._MAX_COLS-3) + '...'}") + @unittest.skipIf(MISSING_C_DOCSTRINGS, + "Signature information for builtins requires docstrings") def test_multiline_docstring(self): # Test fewer lines than max. self.assertEqual(get_spec(range), @@ -157,6 +162,7 @@ bytes(bytes_or_buffer) -> immutable copy of bytes_or_buffer bytes(int) -> bytes object of size given by the parameter initialized with null bytes bytes() -> empty bytes object''') + def test_multiline_docstring_2(self): # Test more than max lines def f(): pass f.__doc__ = 'a\n' * 15 |