Add a way to cwd into a tmpdir.

This commit is contained in:
Dave Halter
2017-04-04 21:03:45 +02:00
parent 0117f83809
commit fb8ed61b87
2 changed files with 21 additions and 6 deletions

View File

@@ -131,3 +131,9 @@ def isolated_jedi_cache(monkeypatch, tmpdir):
each test case (scope='function').
"""
monkeypatch.setattr(settings, 'cache_directory', str(tmpdir))
@pytest.fixture()
def cwd_tmpdir(monkeypatch, tmpdir):
with helpers.set_cwd(tmpdir.dirpath):
yield tmpdir