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

Function test_localfs_errors

python/pyarrow/tests/test_fs.py:1154–1171  ·  view source on GitHub ↗
(localfs)

Source from the content-addressed store, hash-verified

1152
1153
1154def test_localfs_errors(localfs):
1155 # Local filesystem errors should raise the right Python exceptions
1156 # (e.g. FileNotFoundError)
1157 fs = localfs['fs']
1158 with assert_file_not_found():
1159 fs.open_input_stream('/non/existent/file')
1160 with assert_file_not_found():
1161 fs.open_output_stream('/non/existent/file')
1162 with assert_file_not_found():
1163 fs.create_dir('/non/existent/dir', recursive=False)
1164 with assert_file_not_found():
1165 fs.delete_dir('/non/existent/dir')
1166 with assert_file_not_found():
1167 fs.delete_file('/non/existent/dir')
1168 with assert_file_not_found():
1169 fs.move('/non/existent', '/xxx')
1170 with assert_file_not_found():
1171 fs.copy_file('/non/existent', '/xxx')
1172
1173
1174def test_localfs_file_info(localfs):

Callers

nothing calls this directly

Calls 8

assert_file_not_foundFunction · 0.90
open_input_streamMethod · 0.45
open_output_streamMethod · 0.45
create_dirMethod · 0.45
delete_dirMethod · 0.45
delete_fileMethod · 0.45
moveMethod · 0.45
copy_fileMethod · 0.45

Tested by

no test coverage detected