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

Function test_delete_file

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

Source from the content-addressed store, hash-verified

994
995
996def test_delete_file(fs, pathfn):
997 p = pathfn('test-delete-target-file')
998 with fs.open_output_stream(p):
999 pass
1000
1001 fs.delete_file(p)
1002 with pytest.raises(pa.ArrowIOError):
1003 fs.delete_file(p)
1004
1005 d = pathfn('test-delete-nested')
1006 fs.create_dir(d)
1007 f = pathfn('test-delete-nested/target-file')
1008 with fs.open_output_stream(f) as s:
1009 s.write(b'data')
1010
1011 fs.delete_dir(d)
1012
1013
1014def identity(v):

Callers

nothing calls this directly

Calls 6

pathfnFunction · 0.85
open_output_streamMethod · 0.45
delete_fileMethod · 0.45
create_dirMethod · 0.45
writeMethod · 0.45
delete_dirMethod · 0.45

Tested by

no test coverage detected