New submission from Terry J. Reedy <tjre...@udel.edu>:

IDLE should run and calltips and tests should work even callables lack 
docstrings, either because none is defined or because there are suppressed 
(CPython compile switch for builtins, CPython runtime switch for user objects). 
 I believe calltips work with or without docstrings present, but:

One User class test is skipped with -OO.  It should be changed to still work.

Multiple builtin tests fail.  #37501 proposes to skip them when compiled 
without docstrings.  The right long-term solution for IDLE is to change the 
tests.  My idea is to expand tiptest with 'out' replaced by the signature part, 
the processed docstring part, and the docstring object.  I want to try 
something like 

def tiptest(obj, docobj, sig, doc):
    out = sig += doc if docobj.__doc__ is not None else ''
    self.assertEqual(get_spec(obj), out)

----------
assignee: terry.reedy
components: IDLE
messages: 360722
nosy: terry.reedy
priority: normal
severity: normal
stage: test needed
status: open
title: Make IDLE calltip tests work when there are no docstrings
type: behavior
versions: Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39456>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to