Add a way to cwd into a tmpdir.

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

No files matched your search

+6
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