Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
078f2fab
Commit
078f2fab
authored
Dec 16, 2016
by
Jason R. Coombs
Committed by
GitHub
Dec 16, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #892 from cedk/exit_on_test_failure
Exit on test failure
parents
083929cf
2c4fd432
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
setuptools/command/test.py
setuptools/command/test.py
+7
-2
No files found.
setuptools/command/test.py
View file @
078f2fab
...
...
@@ -3,7 +3,8 @@ import operator
import
sys
import
contextlib
import
itertools
from
distutils.errors
import
DistutilsOptionError
from
distutils.errors
import
DistutilsError
,
DistutilsOptionError
from
distutils
import
log
from
unittest
import
TestLoader
from
setuptools.extern
import
six
...
...
@@ -226,12 +227,16 @@ class test(Command):
list
(
map
(
sys
.
modules
.
__delitem__
,
del_modules
))
exit_kwarg
=
{}
if
sys
.
version_info
<
(
2
,
7
)
else
{
"exit"
:
False
}
unittest_main
(
test
=
unittest_main
(
None
,
None
,
self
.
_argv
,
testLoader
=
self
.
_resolve_as_ep
(
self
.
test_loader
),
testRunner
=
self
.
_resolve_as_ep
(
self
.
test_runner
),
**
exit_kwarg
)
if
not
test
.
result
.
wasSuccessful
():
msg
=
'Test failed: %s'
%
test
.
result
self
.
announce
(
msg
,
log
.
ERROR
)
raise
DistutilsError
(
msg
)
@
property
def
_argv
(
self
):
...
...
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