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: run test cases based on a glob filter
Type: enhancement Stage: resolved
Components: Tests Versions: Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: eric.araujo, eric.snow, ezio.melotti, michael.foord, pitrou, python-dev
Priority: normal Keywords: patch

Created on 2011-07-23 21:48 by pitrou, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
regrtestglob.patch pitrou, 2011-07-23 21:48
Messages (9)
msg141022 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2011-07-23 21:48
This patch allows to only run tests which satisfy a glob filter, using the --match (-m) option to regrtest. For example:

  ./python -m test -m "*Signal*" -v test_io

will execute all the signal-related tests in test_io.
msg141031 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2011-07-24 01:45
See also #12231 for a similar suggestion.
msg141045 - (view) Author: Michael Foord (michael.foord) * (Python committer) Date: 2011-07-24 14:29
I love the functionality. Running individual tests (or groups of tests) with unittest is a *pain*. I had hoped to solve this through unittest extensions, but this is taking me longer to get to than I had hoped.

So I would like to add this to unittest, but obviously that can't happen for 3.2.
msg141398 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-07-29 16:24
I’d love this in regrtest and unittest.
msg141412 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-07-29 21:58
New changeset 5d7a2bd9a3d1 by Antoine Pitrou in branch '3.2':
Issue #12626: In regrtest, allow to filter tests using a glob filter
http://hg.python.org/cpython/rev/5d7a2bd9a3d1

New changeset 018e14a46454 by Antoine Pitrou in branch 'default':
Issue #12626: In regrtest, allow to filter tests using a glob filter
http://hg.python.org/cpython/rev/018e14a46454
msg141413 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2011-07-29 22:00
I've committed a slightly updated patch that also works with -j.
msg141437 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-07-30 12:50
I didn’t think this would go into a stable version (see #10849 for example).
msg141438 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2011-07-30 12:54
Well, let's say I don't consider test.regrtest, and especially its myriad options, a public API. The aim is to make bug diagnosis and fixing easier.
msg141475 - (view) Author: Michael Foord (michael.foord) * (Python committer) Date: 2011-07-31 18:23
I agree with Antoine, as test.support is not a public api adding new features to assist with debugging is fine.
History
Date User Action Args
2022-04-11 14:57:20adminsetgithub: 56835
2011-12-18 16:42:09pitroulinkissue12231 superseder
2011-07-31 18:23:01michael.foordsetmessages: + msg141475
2011-07-30 12:54:03pitrousetmessages: + msg141438
2011-07-30 12:50:49eric.araujosetmessages: + msg141437
2011-07-29 22:00:28pitrousetstatus: open -> closed
resolution: fixed
messages: + msg141413

stage: patch review -> resolved
2011-07-29 21:58:54python-devsetnosy: + python-dev
messages: + msg141412
2011-07-29 16:24:19eric.araujosetnosy: + eric.araujo

messages: + msg141398
versions: - Python 3.2
2011-07-24 22:26:05eric.snowsetnosy: + eric.snow
2011-07-24 14:29:18michael.foordsetmessages: + msg141045
2011-07-24 01:45:30ezio.melottisetmessages: + msg141031
2011-07-23 21:48:05pitroucreate