homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Enhancing IDLE's test_delegator.py unit test
Type: enhancement Stage: resolved
Components: Tests Versions: Python 3.6, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: Al.Sweigart, python-dev, terry.reedy
Priority: normal Keywords: patch

Created on 2015年04月16日 22:18 by Al.Sweigart, last changed 2022年04月11日 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
test_delegator.patch Al.Sweigart, 2015年04月16日 22:18 review
Messages (3)
msg241284 - (view) Author: Al Sweigart (Al.Sweigart) * Date: 2015年04月16日 22:18
As part of trying to understand the IDLE codebase, I'm taking a look at IDLE's unit tests.
-Added more specific messages when test_delegator.py's assertions fail.
-Added detail to the comments.
-Added an explicit test of the resetcache() method (which before was only tested as far as it was called when setdelegate() was called).
I've rerun the unit test on the existing source code and it passes.
msg265584 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2016年05月15日 05:56
The patch adds too much. Some of the comments are too obvious. See PEP 8. Many of the messages repeat the information already provided in the custom messages already provided by the assertXyz failure methods. For instance, when assertEqual(a, b) fails, the message already prints out something like "%s != $s" % (repr(a), repr(b)). Perhaps you were not familiar with this. One of the problems of retrofitting tests is that we do not see the default failure messages.
In any case, over-commenting and over-messaging are not harmless as they make code and failure messages harder, not easier to read. I will review and add what I think is useful.
msg265659 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016年05月16日 02:07
New changeset 6bc08af57813 by Terry Jan Reedy in branch '3.5':
Issue #23977: Tweak IDLE Delegator and its test.
https://hg.python.org/cpython/rev/6bc08af57813 
History
Date User Action Args
2022年04月11日 14:58:15adminsetgithub: 68165
2016年05月16日 02:08:11terry.reedysetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2016年05月16日 02:07:42python-devsetnosy: + python-dev
messages: + msg265659
2016年05月15日 05:56:51terry.reedysetversions: + Python 3.6
nosy: + terry.reedy

messages: + msg265584

assignee: terry.reedy
stage: patch review
2015年04月16日 22:18:37Al.Sweigartcreate

AltStyle によって変換されたページ (->オリジナル) /