aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--setuptools/tests/test_packageindex.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py
index c6016c09..7b7815ab 100644
--- a/setuptools/tests/test_packageindex.py
+++ b/setuptools/tests/test_packageindex.py
@@ -283,10 +283,15 @@ class TestContentCheckers:
assert rep == 'My message about md5'
+@pytest.fixture
+def temp_home(tmpdir, monkeypatch):
+ monkeypatch.setitem(os.environ, 'HOME', str(tmpdir))
+ return tmpdir
+
+
class TestPyPIConfig:
- def test_percent_in_password(self, tmpdir, monkeypatch):
- monkeypatch.setitem(os.environ, 'HOME', str(tmpdir))
- pypirc = tmpdir / '.pypirc'
+ def test_percent_in_password(self, temp_home):
+ pypirc = temp_home / '.pypirc'
pypirc.write(DALS("""
[pypi]
repository=https://pypi.org