Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
d38e6e51
Commit
d38e6e51
authored
Sep 28, 2012
by
Michael Foord
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Closes issue 16064. No longer hard code executable name in unittest help output.
parent
0e1af282
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
Lib/unittest/__main__.py
Lib/unittest/__main__.py
+8
-1
Misc/NEWS
Misc/NEWS
+2
-0
No files found.
Lib/unittest/__main__.py
View file @
d38e6e51
...
...
@@ -2,7 +2,14 @@
import
sys
if
sys
.
argv
[
0
].
endswith
(
"__main__.py"
):
sys
.
argv
[
0
]
=
"python -m unittest"
import
os.path
# We change sys.argv[0] to make help message more useful
# use executable without path, unquoted
# (it's just a hint anyway)
# (if you have spaces in your executable you get what you deserve!)
executable
=
os
.
path
.
basename
(
sys
.
executable
)
sys
.
argv
[
0
]
=
executable
+
" -m unittest"
del
os
__unittest
=
True
...
...
Misc/NEWS
View file @
d38e6e51
...
...
@@ -36,6 +36,8 @@ Core and Builtins
Library
-------
- Issue #16064: unittest -m claims executable is "python", not "python3"
- Issue #15222: Insert blank line after each message in mbox mailboxes
- Issue #16013: Fix CSV Reader parsing issue with ending quote characters.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment