Commit 2187d0c7 authored by Jason R. Coombs's avatar Jason R. Coombs

Extract fixture for a temp home

parent f6f25adf
...@@ -283,10 +283,15 @@ class TestContentCheckers: ...@@ -283,10 +283,15 @@ class TestContentCheckers:
assert rep == 'My message about md5' assert rep == 'My message about md5'
@pytest.fixture
def temp_home(tmpdir, monkeypatch):
monkeypatch.setitem(os.environ, 'HOME', str(tmpdir))
return tmpdir
class TestPyPIConfig: class TestPyPIConfig:
def test_percent_in_password(self, tmpdir, monkeypatch): def test_percent_in_password(self, temp_home):
monkeypatch.setitem(os.environ, 'HOME', str(tmpdir)) pypirc = temp_home / '.pypirc'
pypirc = tmpdir / '.pypirc'
pypirc.write(DALS(""" pypirc.write(DALS("""
[pypi] [pypi]
repository=https://pypi.org repository=https://pypi.org
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment