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: Allow individual test to be specified by "#" or "."
Type: enhancement Stage: resolved
Components: Tests Versions: Python 3.9
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: Hasan Diwan, ZackerySpytz, ezio.melotti, michael.foord, rbcollins, rhettinger, serhiy.storchaka, xtreak
Priority: normal Keywords:

Created on 2019-07-24 10:30 by Hasan Diwan, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
python.pat Hasan Diwan, 2019-07-24 10:30
Messages (5)
msg348377 - (view) Author: Hasan Diwan (Hasan Diwan) Date: 2019-07-24 10:30
The attached patch allows for individual tests to be specified using a #. 

Existing tests still pass:

 == Tests result: SUCCESS ==

All 40 tests OK.

Total duration: 4 min 15 sec
Tests result: SUCCESS
msg348385 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2019-07-24 12:38
If I understand the patch correctly this is is the behavior of the patch

./python.exe -m unittest test#test_keyword
.......
----------------------------------------------------------------------
Ran 7 tests in 0.001s

OK

Do you have a good use case over why # also needs to be supported? Using "." feels more readable and its more intuitive given import statements use it and almost used throughout the language. I am also not sure how "#" will behave in different shell environments since its a common character used as to denote comments.
msg348391 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2019-07-24 15:39
Why you can not use "."?
msg348414 - (view) Author: Zackery Spytz (ZackerySpytz) * (Python triager) Date: 2019-07-24 23:27
I don't think this change should be made.
msg348421 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2019-07-25 00:56
> I don't think this change should be made.

I recommend closing this request.
History
Date User Action Args
2022-04-11 14:59:18adminsetgithub: 81849
2019-07-28 13:24:48michael.foordsetstatus: open -> closed
resolution: rejected
stage: resolved
2019-07-25 00:56:16rhettingersetnosy: + rhettinger
messages: + msg348421
2019-07-24 23:27:01ZackerySpytzsetnosy: + ZackerySpytz
messages: + msg348414
2019-07-24 15:39:26serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg348391
2019-07-24 12:38:05xtreaksetnosy: + xtreak

messages: + msg348385
versions: - Python 3.5, Python 3.6, Python 3.7, Python 3.8
2019-07-24 11:18:16mentalsetnosy: + rbcollins, ezio.melotti, michael.foord
2019-07-24 10:30:41Hasan Diwancreate