Terry J. Reedy added the comment:

The existing tests in CallTips.py, half of which I wrote based on the ones that 
existed, have one or two deficiencies that are copied in the patch.

First, they are not proper unittests. They test get_argspec indirectly by 
calling .fetch_tip and get_entity. This lead to the new private parameter, 
which will not be needed for the existing tests when get_argspec is called 
directly with objects.

Adding more tests for get_entity, beyond the one in test_calltips.py already, 
is a different issue. The function is mostly a wrapper for eval(), which we may 
assume works correctly.

Second, the doubling resulting from putting expected output in docstrings seems 
a bit flakey. It certainly does not test cases with no docstring or 
multiple-line docstrings.

I am working on a revised patch. (Also, the unittest call was added with 
test_calltip.py and I want it left.)

In 2.7. get_argspec is get_arg_text, with a different implementation. 
Backporting to 2.7 will require some adjustments.

----------

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

Reply via email to