MCPcopy Create free account
hub / github.com/apache/arrow / test_delete_dir_contents

Function test_delete_dir_contents

python/pyarrow/tests/test_fs.py:898–913  ·  view source on GitHub ↗
(fs, pathfn)

Source from the content-addressed store, hash-verified

896
897
898def test_delete_dir_contents(fs, pathfn):
899 skip_fsspec_s3fs(fs)
900
901 d = pathfn('directory/')
902 nd = pathfn('directory/nested/')
903
904 fs.create_dir(nd)
905 fs.delete_dir_contents(d)
906 with pytest.raises(pa.ArrowIOError):
907 fs.delete_dir(nd)
908 fs.delete_dir_contents(nd, missing_dir_ok=True)
909 with pytest.raises(pa.ArrowIOError):
910 fs.delete_dir_contents(nd)
911 fs.delete_dir(d)
912 with pytest.raises(pa.ArrowIOError):
913 fs.delete_dir(d)
914
915
916def _check_root_dir_contents(config):

Callers

nothing calls this directly

Calls 5

skip_fsspec_s3fsFunction · 0.85
pathfnFunction · 0.85
create_dirMethod · 0.45
delete_dir_contentsMethod · 0.45
delete_dirMethod · 0.45

Tested by

no test coverage detected