def METHOD_NAME(monkeypatch):
    def save(*args, **kwargs):
        nonlocal was_called
        was_called = True
        raise PermissionError
    was_called = False
    monkeypatch.setattr(cache, '_save_to_file_system', save)
    try:
        with pytest.warns(Warning):
            parse(path=__file__, cache=True, diff_cache=True)
        assert was_called
    finally:
        parser_cache.clear()