aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/tests
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2015-01-02 00:09:56 -0500
committerJason R. Coombs <jaraco@jaraco.com>2015-01-02 00:09:56 -0500
commit2a29b7359ccfa6c5dc99a08d0a19e1c3ba1dfa5c (patch)
tree0a827456219e80f8c0c64047a19673ba1dd5e048 /setuptools/tests
parentbc030aa9e1e5822524bb3ec9b8a0213f579b7b7c (diff)
downloadexternal_python_setuptools-2a29b7359ccfa6c5dc99a08d0a19e1c3ba1dfa5c.tar.gz
external_python_setuptools-2a29b7359ccfa6c5dc99a08d0a19e1c3ba1dfa5c.tar.bz2
external_python_setuptools-2a29b7359ccfa6c5dc99a08d0a19e1c3ba1dfa5c.zip
Replace remaining setup/teardown with a simple mock.
Diffstat (limited to 'setuptools/tests')
-rw-r--r--setuptools/tests/test_easy_install.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py
index 04a362f5..e052ff1e 100644
--- a/setuptools/tests/test_easy_install.py
+++ b/setuptools/tests/test_easy_install.py
@@ -145,13 +145,7 @@ def setup_context(tmpdir):
@pytest.mark.usefixtures("setup_context")
class TestUserInstallTest:
- def setup_method(self, method):
- self.old_file = easy_install_pkg.__file__
- easy_install_pkg.__file__ = site.USER_SITE
-
- def teardown_method(self, method):
- easy_install_pkg.__file__ = self.old_file
-
+ @mock.patch('setuptools.command.easy_install.__file__', None)
def test_user_install_implied(self):
easy_install_pkg.__file__ = site.USER_SITE
site.ENABLE_USER_SITE = True # disabled sometimes