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
51454c42
Commit
51454c42
authored
Sep 13, 2013
by
Antoine Pitrou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #19013: add unittest.main() epilogs to unittest's own test modules
parent
867b381f
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
29 additions
and
0 deletions
+29
-0
Lib/unittest/test/test_assertions.py
Lib/unittest/test/test_assertions.py
+4
-0
Lib/unittest/test/test_break.py
Lib/unittest/test/test_break.py
+4
-0
Lib/unittest/test/test_case.py
Lib/unittest/test/test_case.py
+4
-0
Lib/unittest/test/test_functiontestcase.py
Lib/unittest/test/test_functiontestcase.py
+4
-0
Lib/unittest/test/test_loader.py
Lib/unittest/test/test_loader.py
+4
-0
Lib/unittest/test/test_runner.py
Lib/unittest/test/test_runner.py
+4
-0
Lib/unittest/test/test_setups.py
Lib/unittest/test/test_setups.py
+1
-0
Lib/unittest/test/test_skipping.py
Lib/unittest/test/test_skipping.py
+4
-0
No files found.
Lib/unittest/test/test_assertions.py
View file @
51454c42
...
...
@@ -361,3 +361,7 @@ class TestLongMessage(unittest.TestCase):
['^"
regex
" does not match "
foo
"$', '^oops$',
'^"
regex
" does not match "
foo
"$',
'^"
regex
" does not match "
foo
" : oops$'])
if __name__ == "
__main__
":
unittest.main()
Lib/unittest/test/test_break.py
View file @
51454c42
...
...
@@ -282,3 +282,7 @@ class TestBreakSignalIgnored(TestBreak):
"if threads have been used"
)
class
TestBreakSignalDefault
(
TestBreak
):
int_handler
=
signal
.
SIG_DFL
if
__name__
==
"__main__"
:
unittest
.
main
()
Lib/unittest/test/test_case.py
View file @
51454c42
...
...
@@ -1405,3 +1405,7 @@ test case
with
support
.
disable_gc
():
del
case
self
.
assertFalse
(
wr
())
if
__name__
==
"__main__"
:
unittest
.
main
()
Lib/unittest/test/test_functiontestcase.py
View file @
51454c42
...
...
@@ -142,3 +142,7 @@ class Test_FunctionTestCase(unittest.TestCase):
test
=
unittest
.
FunctionTestCase
(
lambda
:
None
,
description
=
desc
)
self
.
assertEqual
(
test
.
shortDescription
(),
"this tests foo"
)
if
__name__
==
"__main__"
:
unittest
.
main
()
Lib/unittest/test/test_loader.py
View file @
51454c42
...
...
@@ -1306,3 +1306,7 @@ class Test_TestLoader(unittest.TestCase):
def
test_suiteClass__default_value
(
self
):
loader
=
unittest
.
TestLoader
()
self
.
assertTrue
(
loader
.
suiteClass
is
unittest
.
TestSuite
)
if
__name__
==
"__main__"
:
unittest
.
main
()
Lib/unittest/test/test_runner.py
View file @
51454c42
...
...
@@ -339,3 +339,7 @@ class Test_TextTestRunner(unittest.TestCase):
f
=
io
.
StringIO
()
runner
=
unittest
.
TextTestRunner
(
f
)
self
.
assertTrue
(
runner
.
stream
.
stream
is
f
)
if
__name__
==
"__main__"
:
unittest
.
main
()
Lib/unittest/test/test_setups.py
View file @
51454c42
...
...
@@ -501,5 +501,6 @@ class TestSetups(unittest.TestCase):
with
self
.
assertRaisesRegex
(
Exception
,
msg
):
suite
.
debug
()
if
__name__
==
'__main__'
:
unittest
.
main
()
Lib/unittest/test/test_skipping.py
View file @
51454c42
...
...
@@ -221,3 +221,7 @@ class Test_TestSkipping(unittest.TestCase):
suite
=
unittest
.
TestSuite
([
test
])
suite
.
run
(
result
)
self
.
assertEqual
(
result
.
skipped
,
[(
test
,
"testing"
)])
if
__name__
==
"__main__"
:
unittest
.
main
()
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