Skip to content

Commit e17a423

Browse files
Update HTTPError message catch (#591)
1 parent 3453bf6 commit e17a423

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/test_mlip_calculators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def test_mlips(arch, device, kwargs):
171171
except BadZipFile:
172172
pytest.skip("Model download failed")
173173
except HTTPError as err: # Inherits from URLError, so check first
174-
if "Service Unavailable" in err.msg or "Too Many Requests for url" in err.msg:
174+
if "Service Unavailable" in err.msg or "Too Many Requests" in err.msg:
175175
pytest.skip("Model download failed")
176176
raise err
177177
except URLError as err:

tests/test_single_point.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def test_extras(arch, device, expected_energy, struct, kwargs):
185185
energy = single_point.run()["energy"]
186186
assert energy == pytest.approx(expected_energy, rel=1e-3)
187187
except HTTPError as err: # Inherits from URLError, so check first
188-
if "Service Unavailable" in err.msg or "Too Many Requests for url" in err.msg:
188+
if "Service Unavailable" in err.msg or "Too Many Requests" in err.msg:
189189
pytest.skip("Model download failed")
190190
raise err
191191
except URLError as err:

0 commit comments

Comments
 (0)