Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(13)

#22812: Documentation of unittest -p usage wrong on windows.

Can't Edit
Can't Publish+Mail
Start Review
Created:
4 years, 9 months ago by robertc
Modified:
4 years, 9 months ago
Reviewers:
zachary.ware
CC:
rbcollins, r.david.murray, docs_python.org, devnull_psf.upfronthosting.co.za, Zach Ware, Pam.McANulty
Visibility:
Public.

Patch Set 1 #

Total comments: 2

Patch Set 2 #

Patch Set 3 #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Doc/library/unittest.rst View 1 2 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 2
Zach Ware
https://bugs.python.org/review/22812/diff/14527/Lib/unittest/main.py File Lib/unittest/main.py (right): https://bugs.python.org/review/22812/diff/14527/Lib/unittest/main.py#newcode233 Lib/unittest/main.py:233: self.pattern[0]==self.pattern[-1]: Just a style nit, it's best to avoid ...
4 years, 9 months ago #1
Zach Ware
4 years, 9 months ago #2
http://bugs.python.org/review/22812/diff/14527/Lib/unittest/main.py
File Lib/unittest/main.py (right):

http://bugs.python.org/review/22812/diff/14527/Lib/unittest/main.py#newcode231
Lib/unittest/main.py:231: QUOTE_CHARS = '\'"'
I don't think we should worry about ".  To get " into an argument on Windows you
need to either put in a lot of effort to make sense of the quoting rules, or
make a mistake in trying to make sense of the quoting rules.  In the first case,
the user *really* wants " in their argument, in the second case it's not our
place to clean it up.

Here's an example:

C:\>python -c "import sys;print(sys.argv)" test "test2" "test 3" 'test 4'
'test5' """test 6" ""test 7 "test""8"
['-c', 'test', 'test2', 'test 3', "'test", "4'", "'test5'", '"test 6', 'test',
'7', 'test"8']
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+