Skip to content

Commit 443b10e

Browse files
TST: fix problematic test_set_elevation_open_elevation test
1 parent fdb1791 commit 443b10e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/integration/test_environment.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@ def test_set_elevation_open_elevation(
1818
example_plain_env.set_location(lat, lon)
1919

2020
# either successfully gets the elevation or raises RuntimeError
21-
with pytest.raises(RuntimeError):
21+
try:
2222
example_plain_env.set_elevation(elevation="Open-Elevation")
2323
assert example_plain_env.elevation == pytest.approx(
2424
theoretical_elevation, abs=1
25-
)
25+
), "The Open-Elevation API returned an unexpected value for the elevation"
26+
except RuntimeError:
27+
pass # Ignore the error and pass the test
2628

2729

2830
@patch("matplotlib.pyplot.show")

0 commit comments

Comments
 (0)