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
dbff2e7e
Commit
dbff2e7e
authored
Jun 26, 2017
by
Benoit Pierre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix `test` command running tests twice
parent
84093b78
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
setuptools/command/test.py
setuptools/command/test.py
+10
-1
No files found.
setuptools/command/test.py
View file @
dbff2e7e
...
...
@@ -18,6 +18,11 @@ from setuptools.py31compat import unittest_main
class
ScanningLoader
(
TestLoader
):
def
__init__
(
self
):
TestLoader
.
__init__
(
self
)
self
.
_visited
=
set
()
def
loadTestsFromModule
(
self
,
module
,
pattern
=
None
):
"""Return a suite of all tests cases contained in the given module
...
...
@@ -25,6 +30,10 @@ class ScanningLoader(TestLoader):
If the module has an ``additional_tests`` function, call it and add
the return value to the tests.
"""
if
module
in
self
.
_visited
:
return
None
self
.
_visited
.
add
(
module
)
tests
=
[]
tests
.
append
(
TestLoader
.
loadTestsFromModule
(
self
,
module
))
...
...
@@ -101,7 +110,7 @@ class test(Command):
return
list
(
self
.
_test_args
())
def
_test_args
(
self
):
if
not
self
.
test_suite
:
if
not
self
.
test_suite
and
sys
.
version_info
>=
(
2
,
7
)
:
yield
'discover'
if
self
.
verbose
:
yield
'--verbose'
...
...
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