Skip to content

Commit

Permalink
fix: handle file not found when removing glob target test
Browse files Browse the repository at this point in the history
  • Loading branch information
john-jam committed Aug 8, 2023
1 parent 8680aef commit ee514b6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
5 changes: 4 additions & 1 deletion fsspec/tests/abstract/copy.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,10 @@ def test_copy_glob(
prefixed_expected = [fs_join(target, p) for p in expected]
assert sorted(output) == sorted(prefixed_expected)

fs.rm(target, recursive=True)
try:
fs.rm(target, recursive=True)
except FileNotFoundError:
pass

def test_copy_list_of_files_to_existing_directory(
self, fs, fs_join, fs_bulk_operations_scenario_0, fs_target
Expand Down
5 changes: 4 additions & 1 deletion fsspec/tests/abstract/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,10 @@ def test_get_glob(
prefixed_expected = [local_join(target, p) for p in expected]
assert sorted(output) == sorted(prefixed_expected)

local_fs.rm(target, recursive=True)
try:
local_fs.rm(target, recursive=True)
except FileNotFoundError:
pass

def test_get_list_of_files_to_existing_directory(
self,
Expand Down
5 changes: 4 additions & 1 deletion fsspec/tests/abstract/put.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,10 @@ def test_get_glob(
prefixed_expected = [fs_join(target, p) for p in expected]
assert sorted(output) == sorted(prefixed_expected)

fs.rm(target, recursive=True)
try:
fs.rm(target, recursive=True)
except FileNotFoundError:
pass

def test_put_list_of_files_to_existing_directory(
self,
Expand Down

0 comments on commit ee514b6

Please sign in to comment.