def test_pickle_paths_as_pure_cleans_up_on_exception():
    prev_reduce = Path.__reduce__
    try:
        with pickle_paths_as_pure():
            raise ValueError()
    except __HOLE__:
        assert prev_reduce == Path.__reduce__  # ensure we clean up
dataset/ETHPy150Open menpo/menpo/menpo/io/test/io_export_test.py/test_pickle_paths_as_pure_cleans_up_on_exception