Merge pull request #195 from sturmianseq/fix

Removing state pollution in `parser_cache`
This commit is contained in:
Batuhan Taskaya
2021-08-25 12:13:45 +03:00
committed by GitHub

View File

@@ -185,6 +185,9 @@ def test_permission_error(monkeypatch):
was_called = False was_called = False
monkeypatch.setattr(cache, '_save_to_file_system', save) monkeypatch.setattr(cache, '_save_to_file_system', save)
with pytest.warns(Warning): try:
parse(path=__file__, cache=True, diff_cache=True) with pytest.warns(Warning):
assert was_called parse(path=__file__, cache=True, diff_cache=True)
assert was_called
finally:
parser_cache.clear()