@@ -280,9 +280,8 @@ def test_get_file_seekable_default(fs, remote_dir, tmp_path):
280280
281281 # Test default behavior (seekable=False)
282282 local_file = tmp_path / "test_default.txt"
283- fs .get_file (remote_dir + "/test_file.txt" , str (local_file ))
284- with open (local_file , "rb" ) as f :
285- assert f .read () == data
283+ with pytest .raises (OSError , match = "only valid on seekable files" ):
284+ fs .get_file (remote_dir + "/test_file.txt" , str (local_file ))
286285
287286 # Test with explicit seekable=True
288287 local_file_seekable = tmp_path / "test_seekable.txt"
@@ -292,11 +291,10 @@ def test_get_file_seekable_default(fs, remote_dir, tmp_path):
292291
293292 # Test with explicit seekable=False
294293 local_file_not_seekable = tmp_path / "test_not_seekable.txt"
295- fs .get_file (
296- remote_dir + "/test_file.txt" , str (local_file_not_seekable ), seekable = False
297- )
298- with open (local_file_not_seekable , "rb" ) as f :
299- assert f .read () == data
294+ with pytest .raises (OSError , match = "only valid on seekable files" ):
295+ fs .get_file (
296+ remote_dir + "/test_file.txt" , str (local_file_not_seekable ), seekable = False
297+ )
300298
301299
302300def test_cat_file_seekable_override (fs , remote_dir ):
0 commit comments