diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2015-03-14 22:40:27 -0400 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2015-03-14 22:40:27 -0400 |
| commit | d2c7e902c0de3136ed11ee9890ab842da1bfc9e0 (patch) | |
| tree | 96f53281843093f0fff0eda6f3376662af5a61af | |
| parent | 877e4594e65d2134f7b4766d794507ad132c9f77 (diff) | |
| download | python-setuptools-bitbucket-d2c7e902c0de3136ed11ee9890ab842da1bfc9e0.tar.gz | |
Bypass the checking of site-packages when asserting not user install in site-packages. Fixes #360.
| -rw-r--r-- | setuptools/tests/test_easy_install.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index c5714998..e71bbfc9 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -154,13 +154,23 @@ def setup_context(tmpdir): @pytest.mark.usefixtures("setup_context") class TestUserInstallTest: + # prevent check that site-packages is writable. easy_install + # shouldn't be writing to system site-packages during finalize + # options, but while it does, bypass the behavior. + prev_sp_write = mock.patch( + 'setuptools.command.easy_install.easy_install.check_site_dir', + mock.Mock(), + ) + # simulate setuptools installed in user site packages @mock.patch('setuptools.command.easy_install.__file__', site.USER_SITE) @mock.patch('site.ENABLE_USER_SITE', True) + @prev_sp_write def test_user_install_not_implied_user_site_enabled(self): self.assert_not_user_site() @mock.patch('site.ENABLE_USER_SITE', False) + @prev_sp_write def test_user_install_not_implied_user_site_disabled(self): self.assert_not_user_site() |
