summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/idle_test/test_calltip.py
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2020-11-20 06:59:11 (GMT)
committerGitHub <noreply@github.com>2020-11-20 06:59:11 (GMT)
commit7ddbaa7a1b3e61847ee99658be6a7268a049e302 (patch)
tree4e4a1aa9c86eeef83e11d18a81dbb8663142661e /Lib/idlelib/idle_test/test_calltip.py
parente1dc0db8c7cb8c4d7343e051ba85146b375bb8e0 (diff)
downloadcpython-7ddbaa7a1b3e61847ee99658be6a7268a049e302.zip
cpython-7ddbaa7a1b3e61847ee99658be6a7268a049e302.tar.gz
cpython-7ddbaa7a1b3e61847ee99658be6a7268a049e302.tar.bz2
bpo-42416: Use inspect.getdoc for IDLE calltips (GH-23416)
Inspect.getdoc(ob) sometimes gets docstrings when ob.__doc__ is None.
Diffstat (limited to 'Lib/idlelib/idle_test/test_calltip.py')
-rw-r--r--Lib/idlelib/idle_test/test_calltip.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/Lib/idlelib/idle_test/test_calltip.py b/Lib/idlelib/idle_test/test_calltip.py
index 489b689..a76829f 100644
--- a/Lib/idlelib/idle_test/test_calltip.py
+++ b/Lib/idlelib/idle_test/test_calltip.py
@@ -99,7 +99,12 @@ non-overlapping occurrences o...''')
(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, *, max_lines=None,
- placeholder=' [...]')''')
+ placeholder=' [...]')
+Object for wrapping/filling text. The public interface consists of
+the wrap() and fill() methods; the other methods are just there for
+subclasses to override in order to tweak the default behaviour.
+If you want to completely replace the main wrapping algorithm,
+you\'ll probably have to override _wrap_chunks().''')
def test_properly_formated(self):
@@ -241,7 +246,7 @@ bytes() -> empty bytes object''')
__class__ = property({}.__getitem__, {}.__setitem__)
class Object(metaclass=Type):
__slots__ = '__class__'
- for meth, mtip in ((Type, default_tip), (Object, default_tip),
+ for meth, mtip in ((Type, get_spec(type)), (Object, default_tip),
(Object(), '')):
with self.subTest(meth=meth, mtip=mtip):
self.assertEqual(get_spec(meth), mtip)