diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2015-03-06 15:58:03 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2015-03-06 15:58:03 -0500 |
commit | 52172aa131f643c83370aa36968fa3f279c53858 (patch) | |
tree | 184d56802158a7ffaa6e7cf6929aeaead4562b9d /setuptools/tests/test_easy_install.py | |
parent | 997f97fcf456e9f63664e356e5ed2838e33d4cba (diff) | |
download | external_python_setuptools-52172aa131f643c83370aa36968fa3f279c53858.tar.gz external_python_setuptools-52172aa131f643c83370aa36968fa3f279c53858.tar.bz2 external_python_setuptools-52172aa131f643c83370aa36968fa3f279c53858.zip |
Move patching into the patch methods.
Diffstat (limited to 'setuptools/tests/test_easy_install.py')
-rw-r--r-- | setuptools/tests/test_easy_install.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index eed3bdb5..773ca6b6 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -154,18 +154,14 @@ def setup_context(tmpdir): @pytest.mark.usefixtures("setup_context") class TestUserInstallTest: - @mock.patch('setuptools.command.easy_install.__file__', None) + # simulate setuptools installed in user site packages + @mock.patch('setuptools.command.easy_install.__file__', site.USER_SITE) + @mock.patch('site.ENABLE_USER_SITE', True) def test_user_install_not_implied_user_site_enabled(self): - # simulate setuptools installed in user site packages - easy_install_pkg.__file__ = site.USER_SITE - site.ENABLE_USER_SITE = True - self.assert_not_user_site() + @mock.patch('site.ENABLE_USER_SITE', False) 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 |