summaryrefslogtreecommitdiff
path: root/setuptools/tests/fixtures.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2015-01-02 09:49:58 -0500
committerJason R. Coombs <jaraco@jaraco.com>2015-01-02 09:49:58 -0500
commitbbb68a8b848f9dbd4d44419fdae93b5e057763e5 (patch)
tree9666672d539a35006f7e518f3bec489020601f82 /setuptools/tests/fixtures.py
parentb14ed9cb87ba7f9aff5baecceae9ca54351a6b4e (diff)
downloadpython-setuptools-git-bbb68a8b848f9dbd4d44419fdae93b5e057763e5.tar.gz
Rewrite test using pytest.
Diffstat (limited to 'setuptools/tests/fixtures.py')
-rw-r--r--setuptools/tests/fixtures.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/setuptools/tests/fixtures.py b/setuptools/tests/fixtures.py
index 225c2ea3..0b1eaf5f 100644
--- a/setuptools/tests/fixtures.py
+++ b/setuptools/tests/fixtures.py
@@ -3,6 +3,7 @@ import pytest
from . import contexts
+
@pytest.yield_fixture
def user_override():
"""
@@ -15,3 +16,9 @@ def user_override():
with mock.patch('site.USER_SITE', user_site):
with contexts.save_user_site_setting():
yield
+
+
+@pytest.yield_fixture
+def tmpdir_cwd(tmpdir):
+ with tmpdir.as_cwd() as orig:
+ yield orig