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: tests: allow to select tests using loadTestsFromName
Type: enhancement Stage:
Components: Tests Versions:
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: blueyed, ezio.melotti, michael.foord, rbcollins, terry.reedy
Priority: normal Keywords:

Created on 2018-06-23 19:27 by blueyed, last changed 2022-04-11 14:59 by admin.

Pull Requests
URL Status Linked Edit
PR 7866 open blueyed, 2018-06-23 19:27
Messages (2)
msg320325 - (view) Author: daniel hahler (blueyed) * Date: 2018-06-23 19:27
I was not aware of `python -m test -m …`, but think that supporting `python -m test test.module.class.name` should be supported for selecting a single test.
msg320728 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2018-06-29 18:45
I have used test -m, but a point in favor of this proposal, for other people, is consistency with running unittest

f:\dev\3x>python -m unittest idlelib.idle_test.test_autocomplete.AutoCompleteTest.test_init
Running Debug|Win32 interpreter...
.
----------------------------------------------------------------------
Ran 1 test in 0.176s

However, the current patch appears to be useless for test modules, like test_idle, that use load_tests to discover tests, as none of the test modules or classes discovered are attributes of the main test module.  The following both fail.

python -m test test_idle.test_autocomplete
python -m test test_idle.AutoCompleteTest
History
Date User Action Args
2022-04-11 14:59:02adminsetgithub: 78130
2018-06-29 18:45:05terry.reedysetnosy: + ezio.melotti, terry.reedy, michael.foord, rbcollins
messages: + msg320728
2018-06-23 19:27:09blueyedcreate