summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--setuptools/tests/test_easy_install.py16
1 files changed, 7 insertions, 9 deletions
diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py
index ec5d5faa..eed3bdb5 100644
--- a/setuptools/tests/test_easy_install.py
+++ b/setuptools/tests/test_easy_install.py
@@ -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')