Commit 997f97fc authored by Jason R. Coombs's avatar Jason R. Coombs

Extract method for common behavior.

parent dc5ad278
......@@ -160,25 +160,23 @@ class TestUserInstallTest:
easy_install_pkg.__file__ = site.USER_SITE
site.ENABLE_USER_SITE = True
# create a finalized easy_install command
dist = Distribution()
dist.script_name = 'setup.py'
cmd = ei.easy_install(dist)
cmd.args = ['py']
cmd.ensure_finalized()
assert not cmd.user, 'user should not be implied'
self.assert_not_user_site()
def test_user_install_not_implied_user_site_disabled(self):
# ensure user-site not enabled
site.ENABLE_USER_SITE = False
self.assert_not_user_site()
@staticmethod
def assert_not_user_site():
# create a finalized easy_install command
dist = Distribution()
dist.script_name = 'setup.py'
cmd = ei.easy_install(dist)
cmd.args = ['py']
cmd.initialize_options()
assert not cmd.user, 'NOT user should be implied'
cmd.ensure_finalized()
assert not cmd.user, 'user should not be implied'
def test_multiproc_atexit(self):
pytest.importorskip('multiprocessing')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment