From: Terry Jan Reedy Date: Mon, 27 Jan 2014 01:08:26 +0000 (-0500) Subject: Issue #20338: Increase allowed tip width slightly and wrap long signagure lines. X-Git-Tag: v3.4.0rc1~229^2~5^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e2d9b39dd4e11c7d9d348b14c62378ca36a53473;p=thirdparty%2FPython%2Fcpython.git Issue #20338: Increase allowed tip width slightly and wrap long signagure lines. Original patch by Serhiy Storchaka. --- e2d9b39dd4e11c7d9d348b14c62378ca36a53473 diff --cc Lib/idlelib/idle_test/test_calltips.py index eca24ec12939,e71656b6aed7..f27994f3f97c --- a/Lib/idlelib/idle_test/test_calltips.py +++ b/Lib/idlelib/idle_test/test_calltips.py @@@ -64,6 -65,17 +65,19 @@@ class Get_signatureTest(unittest.TestCa gtest(types.MethodType, "method(function, instance)") gtest(SB(), default_tip) + def test_signature_wrap(self): ++ #print(signature(textwrap.TextWrapper)) + self.assertEqual(signature(textwrap.TextWrapper), '''\ + (width=70, initial_indent='', subsequent_indent='', expand_tabs=True, + replace_whitespace=True, fix_sentence_endings=False, break_long_words=True, - drop_whitespace=True, break_on_hyphens=True, tabsize=8)''') ++ drop_whitespace=True, break_on_hyphens=True, tabsize=8, *, max_lines=None, ++ placeholder=' [...]')''') + + def test_docline_truncation(self): + def f(): pass + f.__doc__ = 'a'*300 + self.assertEqual(signature(f), '()\n' + 'a' * (ct._MAX_COLS-3) + '...') + def test_multiline_docstring(self): # Test fewer lines than max. self.assertEqual(signature(list),