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
0ce16727
Commit
0ce16727
authored
Mar 22, 2010
by
Michael Foord
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
expected failure should not trigger failfast behavior in unittest.
parent
49899690
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
8 deletions
+1
-8
Lib/test/test_unittest.py
Lib/test/test_unittest.py
+0
-6
Lib/unittest/main.py
Lib/unittest/main.py
+1
-1
Lib/unittest/result.py
Lib/unittest/result.py
+0
-1
No files found.
Lib/test/test_unittest.py
View file @
0ce16727
...
...
@@ -2113,12 +2113,6 @@ class Test_TestResult(TestCase):
result
.
addUnexpectedSuccess
(
None
)
self
.
assertTrue
(
result
.
shouldStop
)
result
=
unittest
.
TestResult
()
result
.
_exc_info_to_string
=
lambda
*
_
:
''
result
.
failfast
=
True
result
.
addExpectedFailure
(
None
,
None
)
self
.
assertTrue
(
result
.
shouldStop
)
def
testFailFastSetByRunner
(
self
):
runner
=
unittest
.
TextTestRunner
(
stream
=
StringIO
(),
failfast
=
True
)
def
test
(
result
):
...
...
Lib/unittest/main.py
View file @
0ce16727
...
...
@@ -178,7 +178,7 @@ class TestProgram(object):
testRunner
=
self
.
testRunner
(
verbosity
=
self
.
verbosity
,
failfast
=
self
.
failfast
)
except
TypeError
:
# didn't accept the verbosity or failfast argument
# didn't accept the verbosity or failfast argument
s
testRunner
=
self
.
testRunner
()
else
:
# it is assumed to be a TestRunner instance
...
...
Lib/unittest/result.py
View file @
0ce16727
...
...
@@ -81,7 +81,6 @@ class TestResult(object):
"""Called when a test is skipped."""
self
.
skipped
.
append
((
test
,
reason
))
@
failfast
def
addExpectedFailure
(
self
,
test
,
err
):
"""Called when an expected failure/error occured."""
self
.
expectedFailures
.
append
(
...
...
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