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
95386da9
Commit
95386da9
authored
Jul 14, 2017
by
Benoit Pierre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: rework clean install test
Use pytest-virtualenv so the test can be run no Windows too.
parent
bf20d881
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
30 deletions
+34
-30
.travis.yml
.travis.yml
+0
-3
setuptools/tests/test_virtualenv.py
setuptools/tests/test_virtualenv.py
+31
-0
tests/clean_install.sh
tests/clean_install.sh
+0
-27
tests/requirements.txt
tests/requirements.txt
+3
-0
No files found.
.travis.yml
View file @
95386da9
...
...
@@ -43,7 +43,4 @@ install:
# update egg_info based on setup.py in checkout
-
python bootstrap.py
# Check that setuptools can be installed in a clean environment
-
tests/clean_install.sh
script
:
tox
setuptools/tests/test_virtualenv.py
0 → 100644
View file @
95386da9
import
os
from
pytest
import
yield_fixture
from
pytest_fixture_config
import
yield_requires_config
import
pytest_virtualenv
@
yield_requires_config
(
pytest_virtualenv
.
CONFIG
,
[
'virtualenv_executable'
])
@
yield_fixture
(
scope
=
'function'
)
def
bare_virtualenv
():
""" Bare virtualenv (no pip/setuptools/wheel).
"""
with
pytest_virtualenv
.
VirtualEnv
(
args
=
(
'--no-wheel'
,
'--no-pip'
,
'--no-setuptools'
,
))
as
venv
:
yield
venv
SOURCE_DIR
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'../..'
)
def
test_clean_env_install
(
bare_virtualenv
):
"""
Check setuptools can be installed in a clean environment.
"""
bare_virtualenv
.
run
(
' && '
.
join
((
'cd {source}'
,
'python setup.py install'
,
)).
format
(
source
=
SOURCE_DIR
))
tests/clean_install.sh
deleted
100755 → 0
View file @
bf20d881
#!/usr/bin/env bash
# This test was created in
# https://github.com/pypa/setuptools/pull/1050
# but it really should be incorporated into the test suite
# such that it runs on Windows and doesn't depend on
# virtualenv. Moving to test_integration will likely address
# those concerns.
set
-o
errexit
set
-o
xtrace
# Create a temporary directory to install the virtualenv in
VENV_DIR
=
"
$(
mktemp
-d
)
"
function
cleanup
()
{
rm
-rf
"
$VENV_DIR
"
}
trap
cleanup EXIT
# Create a virtualenv that doesn't have pip or setuptools installed
wget https://raw.githubusercontent.com/pypa/virtualenv/master/virtualenv.py
python virtualenv.py
--no-wheel
--no-pip
--no-setuptools
"
$VENV_DIR
"
source
"
$VENV_DIR
/bin/activate"
# Now try to install setuptools
python bootstrap.py
python setup.py
install
tests/requirements.txt
View file @
95386da9
importlib; python_version<"2.7"
mock
pytest-flake8
pytest-virtualenv>=1.2.7
pytest>=3.0.2
virtualenv
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