mirror of
https://github.com/davidhalter/parso.git
synced 2025-12-08 05:34:51 +08:00
Applying try & finally blocks
This commit is contained in:
@@ -185,7 +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)
|
||||||
parser_cache.clear()
|
assert was_called
|
||||||
|
finally:
|
||||||
|
parser_cache.clear()
|
||||||
|
|||||||
Reference in New Issue
Block a user