Title: Make ./python -m test work to run test suite in Python 2.7
Type: enhancement Stage: patch review
Components: Tests Versions: Python 2.7
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: Marc.Abramowitz, ezio.melotti, loewis
Priority: normal Keywords: patch

Created on 2012-05-20 03:56 by Marc.Abramowitz, last changed 2012-05-20 07:33 by loewis. This issue is now closed.

File name Uploaded Description Edit
python2.7_test.patch Marc.Abramowitz, 2012-05-20 03:56 2 line patch to make "./python -m test" work on 2.7 review
Messages (3)
msg161180 - (view) Author: Marc Abramowitz (Marc.Abramowitz) * Date: 2012-05-20 03:56
Currently, the devguide ( mentions two sets of commands for running the CPython test suite:

* For Python 3, one uses: ./python -m test

* For Python 2.7, one must use: ./python -m test.regrtest because ./python -m test fails with an error:No module named test.__main__; 'test' is a package and cannot be directly executed

If you take these two variations and multiply by the 3 variations of "python" command required depending on the OS (Windows, OS X, or other), then there are 6 permutations. I would say that this doesn't exactly encourage newcomers to CPython to contribute.

To take away a bit of the complexity, I have an extremely simple patch that adds one two line file to make ./python -m test work on 2.7.
msg161188 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2012-05-20 07:30
This is a new feature, not a bug fix, so it can't be added to 2.7.

Newcomers to CPython don't need to bother with 2.7 in general, which can reduce the combination in half. If they want to use something that works in all versions, they can use '-m test.regrtest'.
msg161189 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2012-05-20 07:33
Follow-up: I still use 'python Lib/test/'. This works in all versions since Python 2.0 (with the right Python binary), and supports tab completion in the shell.
Date User Action Args
2012-05-20 07:33:35loewissetmessages: + msg161189
2012-05-20 07:30:37loewissetstatus: open -> closed

nosy: + loewis
messages: + msg161188

resolution: rejected
2012-05-20 04:07:29ezio.melottisetnosy: + ezio.melotti

type: enhancement
stage: patch review
title: (Patch included) Make ./python -m test work to run test suite in Python 2.7 -> Make ./python -m test work to run test suite in Python 2.7
2012-05-20 03:56:51Marc.Abramowitzcreate