Skip to content

Commit b58675e

Browse files
committed
test: fix test error with python2
1 parent e65e840 commit b58675e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tests/cases/test_http/test_regions_provider.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def cached_regions_provider(request):
9191
if persist_path:
9292
try:
9393
os.remove(persist_path)
94-
except FileNotFoundError:
94+
except OSError:
9595
pass
9696

9797

@@ -130,7 +130,7 @@ def test_getter_with_expired_file_cache(self, cached_regions_provider):
130130
assert list(cached_regions_provider) == [r_z0]
131131
try:
132132
os.remove(cached_regions_provider.persist_path)
133-
except FileNotFoundError:
133+
except OSError:
134134
pass
135135

136136
@pytest.mark.parametrize(

tests/cases/test_services/test_storage/test_uploaders_default_retrier.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def fake_progress_record(request):
2828
def _delete():
2929
try:
3030
os.remove(file_path)
31-
except FileNotFoundError:
31+
except OSError:
3232
pass
3333

3434
def _exists():

0 commit comments

Comments
 (0)