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:
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
......
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