Skip to content

Commit

Permalink
Fix failing Nominatim tests by loosening up delta a little
Browse files Browse the repository at this point in the history
```
____ NominatimTestCase.test_country_codes_list ____
test/geocoders/nominatim.py:302: in test_country_codes_list
    {"latitude": 40.2317, "longitude": 32.6839},
test/geocoders/util.py:59: in geocode_run
    **expected)
test/geocoders/util.py:134: in _verify_request
    self.assertFalse(exceptions)
E   AssertionError: [AssertionError('40.1863626 != 40.2317 within 0.04 delta (0.04533739999999398 difference) : latitude differs')] is not false
____ NominatimTestCase.test_country_codes_str ____
test/geocoders/nominatim.py:295: in test_country_codes_str
    {"latitude": 40.2317, "longitude": 32.6839},
test/geocoders/util.py:59: in geocode_run
    **expected)
test/geocoders/util.py:134: in _verify_request
    self.assertFalse(exceptions)
E   AssertionError: [AssertionError('40.1863626 != 40.2317 within 0.04 delta (0.04533739999999398 difference) : latitude differs')] is not false
```
  • Loading branch information
KostyaEsmukov committed Jan 22, 2020
1 parent 87ea08d commit ca5aeab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/geocoders/nominatim.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,14 +292,14 @@ def test_country_codes_str(self):
self.geocode_run(
{"query": "kazan",
"country_codes": 'tr'},
{"latitude": 40.2317, "longitude": 32.6839},
{"latitude": 40.2317, "longitude": 32.6839, "delta": 2},
)

def test_country_codes_list(self):
self.geocode_run(
{"query": "kazan",
"country_codes": ['cn', 'tr']},
{"latitude": 40.2317, "longitude": 32.6839},
{"latitude": 40.2317, "longitude": 32.6839, "delta": 2},
)

def test_featuretype_param(self):
Expand Down

0 comments on commit ca5aeab

Please sign in to comment.