Skip to content

Commit

Permalink
TST: fix problematic test_set_elevation_open_elevation test
Browse files Browse the repository at this point in the history
  • Loading branch information
Gui-FernandesBR committed Jul 14, 2024
1 parent c503238 commit f1a49b9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/integration/test_environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ def test_set_elevation_open_elevation(
example_plain_env.set_location(lat, lon)

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


@patch("matplotlib.pyplot.show")
Expand Down

0 comments on commit f1a49b9

Please sign in to comment.