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
588f3c4a
Commit
588f3c4a
authored
Mar 30, 2014
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reformat to add the conventional whitespace and shorter lines.
parent
86cd5168
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
11 deletions
+13
-11
setuptools/command/test.py
setuptools/command/test.py
+13
-11
No files found.
setuptools/command/test.py
View file @
588f3c4a
...
...
@@ -16,26 +16,24 @@ class ScanningLoader(TestLoader):
the return value to the tests.
"""
tests
=
[]
if
module
.
__name__
!=
'setuptools.tests.doctest'
:
# ugh
tests
.
append
(
TestLoader
.
loadTestsFromModule
(
self
,
module
))
if
module
.
__name__
!=
'setuptools.tests.doctest'
:
# ugh
tests
.
append
(
TestLoader
.
loadTestsFromModule
(
self
,
module
))
if
hasattr
(
module
,
"additional_tests"
):
tests
.
append
(
module
.
additional_tests
())
if
hasattr
(
module
,
'__path__'
):
for
file
in
resource_listdir
(
module
.
__name__
,
''
):
if
file
.
endswith
(
'.py'
)
and
file
!=
'__init__.py'
:
submodule
=
module
.
__name__
+
'.'
+
file
[:
-
3
]
if
file
.
endswith
(
'.py'
)
and
file
!=
'__init__.py'
:
submodule
=
module
.
__name__
+
'.'
+
file
[:
-
3
]
else
:
if
resource_exists
(
module
.
__name__
,
file
+
'/__init__.py'
):
if
resource_exists
(
module
.
__name__
,
file
+
'/__init__.py'
):
submodule
=
module
.
__name__
+
'.'
+
file
else
:
continue
tests
.
append
(
self
.
loadTestsFromName
(
submodule
))
if
len
(
tests
)
!=
1
:
if
len
(
tests
)
!=
1
:
return
self
.
suiteClass
(
tests
)
else
:
return
tests
[
0
]
# don't create a nested suite for only one return
...
...
@@ -66,7 +64,7 @@ class test(Command):
if
self
.
test_module
is
None
:
self
.
test_suite
=
self
.
distribution
.
test_suite
else
:
self
.
test_suite
=
self
.
test_module
+
".test_suite"
self
.
test_suite
=
self
.
test_module
+
".test_suite"
elif
self
.
test_module
:
raise
DistutilsOptionError
(
"You may specify a module or a suite, but not both"
...
...
@@ -77,14 +75,18 @@ class test(Command):
if
self
.
verbose
:
self
.
test_args
.
insert
(
0
,
'--verbose'
)
if
self
.
test_loader
is
None
:
self
.
test_loader
=
getattr
(
self
.
distribution
,
'test_loader'
,
None
)
self
.
test_loader
=
getattr
(
self
.
distribution
,
'test_loader'
,
None
)
if
self
.
test_loader
is
None
:
self
.
test_loader
=
"setuptools.command.test:ScanningLoader"
if
self
.
test_runner
is
None
:
self
.
test_runner
=
getattr
(
self
.
distribution
,
'test_runner'
,
None
)
def
with_project_on_sys_path
(
self
,
func
):
if
sys
.
version_info
>=
(
3
,)
and
getattr
(
self
.
distribution
,
'use_2to3'
,
False
):
with_2to3
=
(
sys
.
version_info
>=
(
3
,)
and
getattr
(
self
.
distribution
,
'use_2to3'
,
False
)
)
if
with_2to3
:
# If we run 2to3 we can not do this inplace:
# Ensure metadata is up-to-date
...
...
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