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.

Title: improve regrtest command line help
Type: enhancement Stage: resolved
Components: Tests Versions: Python 3.2, Python 2.7
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: r.david.murray Nosy List: eric.araujo, eric.smith, ezio.melotti, r.david.murray, techtonik
Priority: normal Keywords: easy, needs review, patch

Created on 2010-04-06 09:35 by techtonik, last changed 2022-04-11 14:56 by admin. This issue is now closed.

File name Uploaded Description Edit
8325.improve-regrtest-help.diff techtonik, 2010-04-06 10:36
8325.improve-regrtest-help-v2.diff techtonik, 2010-04-23 07:33
regrtest-help.patch r.david.murray, 2010-04-23 15:38
Messages (12)
msg102443 - (view) Author: anatoly techtonik (techtonik) Date: 2010-04-06 09:35
regrtest command line help can be greatly improved to encourage users run tests.
msg102444 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2010-04-06 09:39
Any suggestions for what these changes would be?
msg102448 - (view) Author: anatoly techtonik (techtonik) Date: 2010-04-06 10:36
This should be enough for now. Is HG diff against trunk ok?
msg102454 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2010-04-06 11:24
That diff format looks fine to me. I'll review the content of your changes in the next day or so.
msg103915 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-04-21 22:14

I reviewed the patch and it looks good to me apart from two minor things.

There’s one typo, “argumets”, and one nitpick: I’ve seen a number of programs with more than one usage line, none of them numbers the lines. So remove “1.” and “2.”.

Thanks for the patch.

msg103991 - (view) Author: anatoly techtonik (techtonik) Date: 2010-04-23 07:33
Thanks for proofreading. I've uploaded a new version here with typo fix, but do not removed 1., 2. numbering. It is a very awesome feature of console UI. When you're in a hurry (and you always in a hurry when you forget something) it is easy to miss the line that starts with "Usage:" or the line below it that may be thought as continuation of arguments. The digit prefix gives you a clear signal that there is more than one way to run this. If you need an authority, take a look at the tool you are using to commit the patch. =)
msg104001 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-04-23 10:24

I don’t know what “the tool I am using to commit the patch” is (I don’t
commit patches), but every program I tested does not use numbers with
usage/synopsis lines. Having the name of the program at the start of
each line prevents me from thinking it’s a continuation (and my pager,
most, colorizes it).

That said, I’m not sure it’s useful to include both usage lines. I’d
suggest advertising only the ”-m” way.

Some of the phrasing of the patch should be improved; if no native
speaker does it this week-end, I’ll propose something.

msg104022 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2010-04-23 15:38
The numbers should definitely not be there.  I favor just documenting the -m version, and you'll see why in the attached patch.  I've incorporated Anatoly's improvement to the argument description and the option updates, and made some additional improvements.  I've also more extensively rewritten the -s docs, but Florent and I are still discussing where the pynexttest file should really go (currently -s is broken on trunk).  Or maybe we should just get rid of -s.
msg104038 - (view) Author: anatoly techtonik (techtonik) Date: 2010-04-23 18:59
Éric: svn merge

R.David Murray: "The numbers should definitely not be there." is not an argument.  `python` should also be a supported way to run regression suite.  With only -m favor documented somebody can quickly forget about it.  I use Mercurial clones for development, I also can't compile Windows binaries (no money, space and time for VS), so it is important for me to be able to run manually from the same directory I am hacking tests and global interpreter.
msg104041 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2010-04-23 19:44
You are correct, it wasn't an argument.  I've never seen numbered alternatives anywhere *except* the svn merge help (which I've never looked at before, since I/we don't use it for python development).  And I don't like them.  (svn merge uses them to cross reference the explanatory comments that follow, but I still don't like them and I think the svnmerge help would read better without them.)

I see your point about the alternate form, though you could still use -m by making sure your modified Lib dir was in PYTHONPATH, or run it with the Lib dir as the CWD.  Without doing that I don't think you'd be testing your modified Lib directory anyway (though you would be running the modified test files).  I'm not sure about that, though, I haven't run enough experiments :)
msg104042 - (view) Author: anatoly techtonik (techtonik) Date: 2010-04-23 20:02
To reach a consensus we can drop line numbering, but I still would like to see two variants of invocation. Sometimes I indeed copy library from trunk/ to main Lib/ for testing, but there is no better way to work with the test suite inside version control and outside of this main library on Windows.
msg104250 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2010-04-26 17:04
Committed (with both call formats) to trunk in r80503 and py3k in r80505.
Date User Action Args
2022-04-11 14:56:59adminsetgithub: 52572
2010-04-26 17:04:11r.david.murraysetstatus: open -> closed
resolution: accepted
messages: + msg104250

stage: patch review -> resolved
2010-04-23 20:02:45techtoniksetmessages: + msg104042
2010-04-23 19:44:48r.david.murraysetmessages: + msg104041
2010-04-23 18:59:06techtoniksetmessages: + msg104038
2010-04-23 15:42:07r.david.murraysetassignee: r.david.murray
2010-04-23 15:38:58r.david.murraysetversions: - Python 2.6
2010-04-23 15:38:23r.david.murraysetfiles: + regrtest-help.patch
nosy: + r.david.murray
messages: + msg104022

2010-04-23 10:24:30eric.araujosetmessages: + msg104001
2010-04-23 07:42:22ezio.melottisetnosy: + ezio.melotti
2010-04-23 07:33:05techtoniksetfiles: + 8325.improve-regrtest-help-v2.diff

messages: + msg103991
2010-04-21 22:14:28eric.araujosetnosy: + eric.araujo
messages: + msg103915
2010-04-06 11:24:43eric.smithsetpriority: normal
keywords: + easy, needs review
messages: + msg102454

stage: needs patch -> patch review
2010-04-06 10:36:14techtoniksetfiles: + 8325.improve-regrtest-help.diff
keywords: + patch
messages: + msg102448

versions: + Python 2.6
2010-04-06 09:39:23eric.smithsetversions: + Python 3.2
nosy: + eric.smith

messages: + msg102444

type: enhancement
stage: needs patch
2010-04-06 09:35:12techtonikcreate