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
2f3b7b20
Commit
2f3b7b20
authored
Sep 18, 2016
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract test.install_dists and distill it with a variable extraction and fallback variables.
parent
469be24c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
12 deletions
+14
-12
CHANGES.rst
CHANGES.rst
+2
-1
setuptools/command/test.py
setuptools/command/test.py
+12
-11
No files found.
CHANGES.rst
View file @
2f3b7b20
...
@@ -7,7 +7,8 @@ v27.3.0
...
@@ -7,7 +7,8 @@ v27.3.0
*
#
794
:
In
test
command
,
add
installed
eggs
to
PYTHONPATH
*
#
794
:
In
test
command
,
add
installed
eggs
to
PYTHONPATH
when
invoking
tests
so
that
subprocesses
will
also
have
the
when
invoking
tests
so
that
subprocesses
will
also
have
the
dependencies
available
.
dependencies
available
.
Fixes
`
tox
330
<
https
://
github
.
com
/
tox
-
dev
/
tox
/
issues
/
330
>`
_
.
v27
.2.0
v27
.2.0
-------
-------
...
...
setuptools/command/test.py
View file @
2f3b7b20
...
@@ -2,6 +2,7 @@ import os
...
@@ -2,6 +2,7 @@ import os
import
operator
import
operator
import
sys
import
sys
import
contextlib
import
contextlib
import
itertools
from
distutils.errors
import
DistutilsOptionError
from
distutils.errors
import
DistutilsOptionError
from
unittest
import
TestLoader
from
unittest
import
TestLoader
...
@@ -185,18 +186,18 @@ class test(Command):
...
@@ -185,18 +186,18 @@ class test(Command):
else
:
else
:
os
.
environ
[
'PYTHONPATH'
]
=
orig_pythonpath
os
.
environ
[
'PYTHONPATH'
]
=
orig_pythonpath
def
install_dists
(
self
):
"""
Install the requirements indicated by self.distribution and
return an iterable of the dists that were built.
"""
dist
=
self
.
distribution
ir_d
=
dist
.
fetch_build_eggs
(
dist
.
install_requires
or
[])
tr_d
=
dist
.
fetch_build_eggs
(
dist
.
tests_require
or
[])
return
itertools
.
chain
(
ir_d
,
tr_d
)
def
run
(
self
):
def
run
(
self
):
installed_dists
=
[]
installed_dists
=
self
.
install_dists
()
if
self
.
distribution
.
install_requires
:
installed_dists
.
extend
(
self
.
distribution
.
fetch_build_eggs
(
self
.
distribution
.
install_requires
,
))
if
self
.
distribution
.
tests_require
:
installed_dists
.
extend
(
self
.
distribution
.
fetch_build_eggs
(
self
.
distribution
.
tests_require
,
))
cmd
=
' '
.
join
(
self
.
_argv
)
cmd
=
' '
.
join
(
self
.
_argv
)
if
self
.
dry_run
:
if
self
.
dry_run
:
...
...
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