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
f3d7a63e
Commit
f3d7a63e
authored
Dec 30, 2014
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove reset_setup_stop_context and reindent.
parent
bf03c647
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
27 deletions
+12
-27
setuptools/tests/test_easy_install.py
setuptools/tests/test_easy_install.py
+12
-27
No files found.
setuptools/tests/test_easy_install.py
View file @
f3d7a63e
...
...
@@ -245,7 +245,7 @@ class TestUserInstallTest(unittest.TestCase):
try
:
with
quiet_context
():
run_setup
(
test_setup_py
,
[
'install'
])
run_setup
(
test_setup_py
,
[
'install'
])
except
SandboxViolation
:
self
.
fail
(
'Installation caused SandboxViolation'
)
except
IndexError
:
...
...
@@ -281,10 +281,10 @@ class TestSetupRequires(unittest.TestCase):
'--exclude-scripts'
,
'--install-dir'
,
temp_install_dir
,
dist_file
]
with
argv_context
([
'easy_install'
]):
# attempt to install the dist. It should fail because
# it doesn't exist.
with
pytest
.
raises
(
SystemExit
):
easy_install_pkg
.
main
(
ei_params
)
# attempt to install the dist. It should fail because
# it doesn't exist.
with
pytest
.
raises
(
SystemExit
):
easy_install_pkg
.
main
(
ei_params
)
# there should have been two or three requests to the server
# (three happens on Python 3.3a)
self
.
assertTrue
(
2
<=
len
(
p_index
.
requests
)
<=
3
)
...
...
@@ -329,13 +329,13 @@ class TestSetupRequires(unittest.TestCase):
test_pkg
=
create_setup_requires_package
(
temp_dir
)
test_setup_py
=
os
.
path
.
join
(
test_pkg
,
'setup.py'
)
with
quiet_context
()
as
(
stdout
,
stderr
):
try
:
# Don't even need to install the package, just
# running the setup.py at all is sufficient
run_setup
(
test_setup_py
,
[
'--name'
])
except
VersionConflict
:
self
.
fail
(
'Installing setup.py requirements '
'caused a VersionConflict'
)
try
:
# Don't even need to install the package, just
# running the setup.py at all is sufficient
run_setup
(
test_setup_py
,
[
'--name'
])
except
VersionConflict
:
self
.
fail
(
'Installing setup.py requirements '
'caused a VersionConflict'
)
lines
=
stdout
.
readlines
()
self
.
assertTrue
(
len
(
lines
)
>
0
)
...
...
@@ -426,21 +426,6 @@ def argv_context(repl):
yield
sys
.
argv
[:]
=
old_argv
@
contextlib
.
contextmanager
def
reset_setup_stop_context
():
"""
When the setuptools tests are run using setup.py test, and then
one wants to invoke another setup() command (such as easy_install)
within those tests, it's necessary to reset the global variable
in distutils.core so that the setup() command will run naturally.
"""
saved
=
distutils
.
core
.
_setup_stop_after
if
saved
is
None
:
raise
ValueError
(
"Not Needed"
)
distutils
.
core
.
_setup_stop_after
=
None
yield
distutils
.
core
.
_setup_stop_after
=
saved
@
contextlib
.
contextmanager
def
quiet_context
():
...
...
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