Skip to content

Commit

Permalink
Improve geocoder test flakyness
Browse files Browse the repository at this point in the history
It looks like the request to [1] produces different results, based on
the client's location. While it worked fine on my workstation, it failed
on GHA.
  • Loading branch information
amotl committed Aug 3, 2022
1 parent 3b1b717 commit 81bd4c8
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests/test_nominatim.py
Expand Up @@ -103,14 +103,20 @@ def test_stadtteil():
Test heuristic OSM improvements re. `suburb` vs. `residential` attribute.
"""

location = resolve_location(latitude=48.482, longitude=9.204)
location = resolve_location(latitude=48.482, longitude=9.203)
improve_location(location)
assert location.address.suburb == 'Ringelbach'
assert location.address.city == 'Reutlingen'
assert location.address.state == 'Baden-Württemberg'

name = format_address(location)
assert name == 'Albrechtstraße, Ringelbach, Reutlingen, Baden-Württemberg, DE'

# Test is flaky in DE vs. US (2022-08-03).
# https://github.com/earthobservations/luftdatenpumpe/runs/7650240048
assert name in [
'Albrechtstraße, Ringelbach, Reutlingen, Baden-Württemberg, DE',
'Paul-Pfizer-Straße, Ringelbach, Reutlingen, Baden-Württemberg, DE',
]


def test_residential_village():
Expand Down

0 comments on commit 81bd4c8

Please sign in to comment.