1
0
forked from VimPlug/jedi

Remove old version of FS cache automatically

This commit is contained in:
Takafumi Arakaki
2013-03-19 21:32:01 +01:00
parent 960dd38e2c
commit f8d3339f2f
3 changed files with 66 additions and 4 deletions

View File

@@ -65,6 +65,18 @@ def pytest_generate_tests(metafunc):
refactor.collect_dir_tests(base_dir, test_files))
@pytest.fixture()
def isolated_jedi_cache(monkeypatch, tmpdir):
"""
Set `jedi.settings.cache_directory` to a temporary directory during test.
Same as `clean_jedi_cache`, but create the temporary directory for
each test case (scope='function').
"""
settings = base.jedi.settings
monkeypatch.setattr(settings, 'cache_directory', str(tmpdir))
@pytest.fixture(scope='session')
def clean_jedi_cache(request):
"""