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
eef159bd
Commit
eef159bd
authored
Mar 22, 2010
by
Michael Foord
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correct usage message displayed for python -m unittest -h
parent
0ce16727
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
10 deletions
+4
-10
Lib/unittest/__init__.py
Lib/unittest/__init__.py
+1
-2
Lib/unittest/__main__.py
Lib/unittest/__main__.py
+2
-1
Lib/unittest/main.py
Lib/unittest/main.py
+1
-7
No files found.
Lib/unittest/__init__.py
View file @
eef159bd
...
...
@@ -52,6 +52,7 @@ __all__ = ['TestResult', 'TestCase', 'TestSuite',
# Expose obsolete functions for backwards compatibility
__all__
.
extend
([
'getTestCaseNames'
,
'makeSuite'
,
'findTestCases'
])
__unittest
=
True
from
.result
import
TestResult
from
.case
import
(
TestCase
,
FunctionTestCase
,
SkipTest
,
skip
,
skipIf
,
...
...
@@ -64,5 +65,3 @@ from .runner import TextTestRunner, TextTestResult
# deprecated
_TextTestResult
=
TextTestResult
__unittest
=
True
Lib/unittest/__main__.py
View file @
eef159bd
...
...
@@ -6,6 +6,7 @@ if sys.argv[0].endswith("__main__.py"):
__unittest
=
True
from
.main
import
main
,
TestProgram
,
USAGE_AS_MAIN
TestProgram
.
USAGE
=
USAGE_AS_MAIN
from
.main
import
main
main
(
module
=
None
)
Lib/unittest/main.py
View file @
eef159bd
...
...
@@ -58,17 +58,11 @@ Examples:
in MyTestCase
"""
if
__name__
==
'__main__'
:
USAGE
=
USAGE_AS_MAIN
else
:
USAGE
=
USAGE_FROM_MODULE
class
TestProgram
(
object
):
"""A command-line program that runs a set of tests; this is primarily
for making test modules conveniently executable.
"""
USAGE
=
USAGE
USAGE
=
USAGE
_FROM_MODULE
def
__init__
(
self
,
module
=
'__main__'
,
defaultTest
=
None
,
argv
=
None
,
testRunner
=
None
,
testLoader
=
loader
.
defaultTestLoader
,
exit
=
True
,
...
...
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