classification
Title: regrtest: add --matchfile option
Type: enhancement Stage: resolved
Components: Tests Versions: Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: martin.panter, serhiy.storchaka, vstinner
Priority: normal Keywords:

Created on 2017-06-01 19:39 by vstinner, last changed 2017-07-18 17:52 by steve.dower. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 1909 merged vstinner, 2017-06-01 19:40
PR 2244 merged vstinner, 2017-06-16 11:35
PR 2249 merged vstinner, 2017-06-16 15:11
PR 2250 merged vstinner, 2017-06-16 15:29
Messages (8)
msg294959 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-06-01 19:39
Attached pull request adds the --matchfile option to regrtest.
    
* Add a new option taking a filename to get a list of test names to filter tests.
* support.match_tests becomes a list.
* Modify run_unittest() to accept to match the whole test identifier, not just a part of a test identifier.
   
For example, the following command only runs test_default_timeout() of the BarrierTests class of test_threading:
    
$ ./python -m test -v test_threading -m test.test_threading.BarrierTests.test_default_timeout
msg294960 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-06-01 19:43
This issue is the last part to implement the issue #29512: "regrtest refleak: implement bisection feature".

See also the second part, bpo-30523: unittest: add --list-tests option to only display the list of test names, don't run tests.
msg295082 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-06-03 15:42
I less need reading test names from a file than other changes in this file. :)

But what about doctests? They are run unconditionally.
msg295496 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-06-09 08:18
New changeset ef8320cf6f09b659c63bfb188bf45dbcae556762 by Victor Stinner in branch 'master':
bpo-30540: regrtest: add --matchfile option (#1909)
https://github.com/python/cpython/commit/ef8320cf6f09b659c63bfb188bf45dbcae556762
msg295497 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-06-09 08:21
> But what about doctests? They are run unconditionally.

Sorry, I don't know how to handle them. I only tried to make a small enhancement for my "bisect" usecase. If you see a way to handle them, don't hesitate to propose a patch!

I would prefer to have time to play with the new feature before backporting it to stable branches. If someone needs this feature right now in stable branches, speak up and maybe also reopen the issue ;-)

My change was merged (with unit tests!), so I close the issue.
msg296188 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-06-16 12:39
New changeset a0ccc54e6dffacf9e7c06f2a3e9056d2d35d21eb by Victor Stinner in branch '3.6':
Synchronize libregrtest from master to 3.6 (#2244)
https://github.com/python/cpython/commit/a0ccc54e6dffacf9e7c06f2a3e9056d2d35d21eb
msg296202 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-06-16 15:30
New changeset 24c2c20873dc800c99d1dabf26419b40cadfe627 by Victor Stinner in branch '2.7':
bpo-30540, bpo-30523: Add --matchfile and --list-cases options to regrtest (#2249)
https://github.com/python/cpython/commit/24c2c20873dc800c99d1dabf26419b40cadfe627
msg296209 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-06-16 16:04
New changeset 46e299c1536da541b9dbf76c0cb909bf8c79f589 by Victor Stinner in branch '3.5':
[3.5] bpo-30540, bpo-30523: Add --matchfile and --list-cases options to regrtest (#2250)
https://github.com/python/cpython/commit/46e299c1536da541b9dbf76c0cb909bf8c79f589
History
Date User Action Args
2017-07-18 17:52:29steve.dowersetpull_requests: - pull_request2809
2017-07-18 17:45:22steve.dowersetpull_requests: + pull_request2809
2017-06-16 16:04:40vstinnersetmessages: + msg296209
2017-06-16 15:30:05vstinnersetmessages: + msg296202
2017-06-16 15:29:09vstinnersetpull_requests: + pull_request2300
2017-06-16 15:11:08vstinnersetpull_requests: + pull_request2298
2017-06-16 12:39:11vstinnersetmessages: + msg296188
2017-06-16 11:35:58vstinnersetpull_requests: + pull_request2290
2017-06-09 08:21:09vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg295497

stage: resolved
2017-06-09 08:18:52vstinnersetmessages: + msg295496
2017-06-03 15:42:26serhiy.storchakasetmessages: + msg295082
2017-06-01 19:43:43vstinnersetmessages: + msg294960
2017-06-01 19:40:37vstinnersetpull_requests: + pull_request1989
2017-06-01 19:39:14vstinnercreate