diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2015-01-02 12:06:51 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2015-01-02 12:06:51 -0500 |
commit | f0eaf642ac52c02cc605ee1222bd143ef5f36623 (patch) | |
tree | 1dab76f9bbb22810d9a0f6e0dd329b31d51b329b /setuptools/tests/test_test.py | |
parent | d66783b40a483c9edf6117d7ebbb49c18e00de17 (diff) | |
download | python-setuptools-git-f0eaf642ac52c02cc605ee1222bd143ef5f36623.tar.gz |
Use skipif marker for real_prefix
Diffstat (limited to 'setuptools/tests/test_test.py')
-rw-r--r-- | setuptools/tests/test_test.py | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/setuptools/tests/test_test.py b/setuptools/tests/test_test.py index abd0038b..5d7b72ba 100644 --- a/setuptools/tests/test_test.py +++ b/setuptools/tests/test_test.py @@ -8,6 +8,8 @@ import site import sys import tempfile +import pytest + from setuptools.compat import StringIO, PY2 from setuptools.command.test import test from setuptools.dist import Distribution @@ -50,12 +52,10 @@ TEST_PY = DALS(""" """) +@pytest.mark.skipif('hasattr(sys, "real_prefix")') class TestTestTest: def setup_method(self, method): - if hasattr(sys, 'real_prefix'): - return - # Directory structure self.dir = tempfile.mkdtemp() os.mkdir(os.path.join(self.dir, 'name')) @@ -90,9 +90,6 @@ class TestTestTest: site.USER_SITE = tempfile.mkdtemp() def teardown_method(self, method): - if hasattr(sys, 'real_prefix'): - return - os.chdir(self.old_cwd) shutil.rmtree(self.dir) shutil.rmtree(site.USER_BASE) @@ -101,9 +98,6 @@ class TestTestTest: site.USER_SITE = self.old_site def test_test(self): - if hasattr(sys, 'real_prefix'): - return - dist = Distribution(dict( name='foo', packages=['name', 'name.space', 'name.space.tests'], |