def METHOD_NAME(monkeypatch):
    def save(*args, **kwargs):
        was_called[0] = True  # Python 2... Use nonlocal instead
        raise PermissionError
    was_called = [False]
    monkeypatch.setattr(cache, '_save_to_file_system', save)
    with pytest.warns(Warning):
        parse(path=__file__, cache=True, diff_cache=True)
    assert was_called[0]