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: idlelib tests are silently skipped by test.regrtest on 2.7
Type: behavior Stage: resolved
Components: IDLE, Tests Versions: Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: ned.deily, terry.reedy
Priority: normal Keywords: patch

Created on 2013-11-04 04:05 by ned.deily, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
test_idle_regrtest_27.patch ned.deily, 2013-11-04 04:05 review
Messages (4)
msg202082 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2013-11-04 04:05
Running test_idle is supposed to cause the tests in Lib/idlelib/idle_test to be run.  Unfortunately, under 2.7, when test.regrtest is used as the test runner, either directly or via "make test" (which buildbots use), the idlelib tests are currently silently skipped.  This can be seen by running with -v and observing that nothing is run:

python -m test.regrtest -v -uall test_idle

The problem is that test_idle.py is depending on regrtest support of the load_tests protocol; that support was only added to regrtest in 3.3.  Without changes to regrtest for 2.7, test_idle needs to define test_main as other tests do.  The attached patch seems to fix the problem.
msg202088 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2013-11-04 05:04
Good catch. I confirmed the non-function, the silence, and the fix. 

Ned, because the patch included a commit message, hg import immediately committed the patch with the incomplete message. This surprised me since it has never happened before. Since the patch tested out ok, the only problem is the message, but if it had not been... Please leave such messages off of posted patches.

Since it is committed, and worked on Mac and Windows, I went ahead and pushed.
msg202092 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2013-11-04 06:35
Terry, sorry the patch was confusing. Just FYI, if you are using "hg import" particularly when reviewing patches, you should always be using "hg import --no-commit" as explained in the devguide to avoid unintended changes.  Whether or not a message is included in the patch has no effect on whether it is committed.  If you do commit a patch by mistake, you can use "hg backout" or, with care, "hg strip" to remove it before pushing.
msg202094 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2013-11-04 08:04
As I explained on the checkins list, I am do "hg import --no-commit" indirectly though TortoiseHg Workbench Repository/import. It normally brings up an edit box for a commit message after patching and if that is left blank, it does not commit. With a message in the patch (non-comment text above 'diff'), it skips the edit box and just commits. I just verified this behavior difference with your patch on a local repository with test_idle.py. I first imported without the message, left the edit box blank, reverted, and then imported with a message added back.

Since the patch says it is a changeset patch, I assume you committed it in and transferred it from a separate repository.
History
Date User Action Args
2022-04-11 14:57:53adminsetgithub: 63687
2013-11-04 08:04:31terry.reedysetmessages: + msg202094
2013-11-04 06:35:05ned.deilysetmessages: + msg202092
2013-11-04 05:04:21terry.reedysetstatus: open -> closed

components: + Tests
assignee: terry.reedy
messages: + msg202088
type: behavior
resolution: fixed
stage: patch review -> resolved
2013-11-04 04:05:16ned.deilycreate