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

Function test_move_directory

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

Source from the content-addressed store, hash-verified

954
955
956def test_move_directory(fs, pathfn, allow_move_dir):
957 # TODO(GH-40025): Stop skipping this test
958 skip_azure(fs, "Not implemented yet in for Azure. See GH-40025")
959
960 # move directory (doesn't work with S3)
961 s = pathfn('source-dir/')
962 t = pathfn('target-dir/')
963
964 fs.create_dir(s)
965
966 if allow_move_dir:
967 fs.move(s, t)
968 with pytest.raises(pa.ArrowIOError):
969 fs.delete_dir(s)
970 fs.delete_dir(t)
971 else:
972 with pytest.raises(pa.ArrowIOError):
973 fs.move(s, t)
974
975
976def test_move_file(fs, pathfn):

Callers

nothing calls this directly

Calls 5

skip_azureFunction · 0.85
pathfnFunction · 0.85
create_dirMethod · 0.45
moveMethod · 0.45
delete_dirMethod · 0.45

Tested by

no test coverage detected