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 | 24b1723a48ef5ba95afeabf96f8021b939d8391a (patch) | |
| tree | 846ba5919c4dd001150d79d17707eecb72976418 /setuptools/tests | |
| parent | 1919a4358eebcfd48e24756e0bb68035e8750800 (diff) | |
| download | python-setuptools-git-24b1723a48ef5ba95afeabf96f8021b939d8391a.tar.gz | |
Bypass the checking of site-packages when asserting not user install in site-packages. Fixes #360.
Diffstat (limited to 'setuptools/tests')
| -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() |
