From 2a29b7359ccfa6c5dc99a08d0a19e1c3ba1dfa5c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 2 Jan 2015 00:09:56 -0500 Subject: Replace remaining setup/teardown with a simple mock. --- setuptools/tests/test_easy_install.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'setuptools/tests/test_easy_install.py') 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 -- cgit v1.2.3