Skip to content

Commit ae491cb

Browse files
authored
Merge pull request #195 from sturmianseq/fix
Removing state pollution in `parser_cache`
2 parents 9f32dde + d26d0d5 commit ae491cb

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

test/test_cache.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,9 @@ def save(*args, **kwargs):
185185
was_called = False
186186

187187
monkeypatch.setattr(cache, '_save_to_file_system', save)
188-
with pytest.warns(Warning):
189-
parse(path=__file__, cache=True, diff_cache=True)
190-
assert was_called
188+
try:
189+
with pytest.warns(Warning):
190+
parse(path=__file__, cache=True, diff_cache=True)
191+
assert was_called
192+
finally:
193+
parser_cache.clear()

0 commit comments

Comments
 (0)