Skip to content

Commit

Permalink
change tests to allow the quality of results to increase (more fields…
Browse files Browse the repository at this point in the history
… returned)
  • Loading branch information
ebreton committed Nov 12, 2017
1 parent 6ec76c9 commit 45de274
Show file tree
Hide file tree
Showing 22 changed files with 42 additions and 42 deletions.
2 changes: 1 addition & 1 deletion tests/test_baidu.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def test_baidu():
assert g.ok
osm_count, fields_count = g.debug()[0]
assert osm_count == 0
assert fields_count == 7
assert fields_count >= 7


def test_baidu_reverse():
Expand Down
4 changes: 2 additions & 2 deletions tests/test_bing.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ def test_bing():
assert g.ok
assert g.city == city
osm_count, fields_count = g.debug()[0]
assert osm_count == 3
assert fields_count == 12
assert osm_count >= 3
assert fields_count >= 12


def test_bing_reverse():
Expand Down
4 changes: 2 additions & 2 deletions tests/test_canadapost.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ def test_canadapost():
g = geocoder.canadapost(location, key='fake', maxRows=3)
assert g.ok
osm_count, fields_count = g.debug()[0]
assert osm_count == 6
assert fields_count == 15
assert osm_count >= 6
assert fields_count >= 15
4 changes: 2 additions & 2 deletions tests/test_freegeoip.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ def test_freegeoip():
g = geocoder.freegeoip(location)
assert g.ok
osm_count, fields_count = g.debug()[0]
assert osm_count == 3
assert fields_count == 12
assert osm_count >= 3
assert fields_count >= 12
4 changes: 2 additions & 2 deletions tests/test_geocodefarm.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ def test_geocodefarm():
result = geocoder.geocodefarm(location)
assert result.ok
osm_count, fields_count = result.debug()[0]
assert osm_count == 3
assert fields_count == 15
assert osm_count >= 3
assert fields_count >= 15


def test_geocodefarm_reverse():
Expand Down
4 changes: 2 additions & 2 deletions tests/test_geolytica.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ def test_geolytica():
g = geocoder.geolytica(location)
assert g.ok
osm_count, fields_count = g.debug()[0]
assert osm_count == 5
assert fields_count == 11
assert osm_count >= 5
assert fields_count >= 11
4 changes: 2 additions & 2 deletions tests/test_geonames.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ def test_geonames_query(geonames_response):
assert len(geonames_response) == 1
assert geonames_response.status_code == 200
osm_count, fields_count = geonames_response.debug()[0]
assert osm_count == 2
assert fields_count == 16
assert osm_count >= 2
assert fields_count >= 16


def test_geonames_first_result(geonames_response):
Expand Down
4 changes: 2 additions & 2 deletions tests/test_google.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ def test_google():
assert g.accuracy == 'APPROXIMATE'
assert str(g.city) == city
osm_count, fields_count = g.debug()[0]
assert osm_count == 3
assert fields_count == 15
assert osm_count >= 3
assert fields_count >= 15


def test_issue_294():
Expand Down
4 changes: 2 additions & 2 deletions tests/test_here.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ def test_here():
g = geocoder.here(location)
assert g.ok
osm_count, fields_count = g.debug()[0]
assert osm_count == 4
assert fields_count == 13
assert osm_count >= 4
assert fields_count >= 13


def test_here_reverse():
Expand Down
4 changes: 2 additions & 2 deletions tests/test_ipinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ def test_ipinfo():
g = geocoder.ipinfo(location)
assert g.ok
osm_count, fields_count = g.debug()[0]
assert osm_count == 4
assert fields_count == 12
assert osm_count >= 4
assert fields_count >= 12
4 changes: 2 additions & 2 deletions tests/test_komoot.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ def test_komoot():
assert g.ok
assert len(g) == 1
osm_count, fields_count = g.debug()[0]
assert osm_count == 3
assert fields_count == 15
assert osm_count >= 3
assert fields_count >= 15


def test_komoot_multi_result():
Expand Down
4 changes: 2 additions & 2 deletions tests/test_mapbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ def test_mapbox():
g = geocoder.mapbox(location)
assert g.ok
osm_count, fields_count = g.debug()[0]
assert osm_count == 2
assert fields_count == 11
assert osm_count >= 2
assert fields_count >= 11


def test_mapbox_reverse():
Expand Down
4 changes: 2 additions & 2 deletions tests/test_mapquest.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ def test_mapquest():
g = geocoder.mapquest(location, timeout=10)
assert g.ok
osm_count, fields_count = g.debug()[0]
assert osm_count == 3
assert fields_count == 10
assert osm_count >= 3
assert fields_count >= 10


def test_mapquest_reverse():
Expand Down
4 changes: 2 additions & 2 deletions tests/test_mapzen.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ def test_mapzen():
g = geocoder.mapzen(location)
assert g.ok
osm_count, fields_count = g.debug()[0]
assert osm_count == 3
assert fields_count == 12
assert osm_count >= 3
assert fields_count >= 12


def test_mapzen_reverse():
Expand Down
4 changes: 2 additions & 2 deletions tests/test_maxmind.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ def test_maxmind():
g = geocoder.maxmind(location)
assert g.ok
osm_count, fields_count = g.debug()[0]
assert osm_count == 1
assert fields_count == 14
assert osm_count >= 1
assert fields_count >= 14
4 changes: 2 additions & 2 deletions tests/test_opencage.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ def test_opencage():
assert g.city == 'Ottawa'
assert g.town == 'Ottawa'
osm_count, fields_count = g.debug()[0]
assert osm_count == 3
assert fields_count == 23
assert osm_count >= 3
assert fields_count >= 23


def test_issue_292():
Expand Down
4 changes: 2 additions & 2 deletions tests/test_osm.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ def test_osm():
g = geocoder.osm(location)
assert g.ok
osm_count, fields_count = g.debug()[0]
assert osm_count == 3
assert fields_count == 21
assert osm_count >= 3
assert fields_count >= 21


def test_osm_reverse():
Expand Down
4 changes: 2 additions & 2 deletions tests/test_ottawa.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ def test_ottawa():
g = geocoder.ottawa(location)
assert g.ok
osm_count, fields_count = g.debug()[0]
assert osm_count == 3
assert fields_count == 10
assert osm_count >= 3
assert fields_count >= 10


def test_multi_results():
Expand Down
4 changes: 2 additions & 2 deletions tests/test_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ def test_session():
g = geocoder.google(address, session=session)
assert g.ok
osm_count, fields_count = g.debug()[0]
assert osm_count == 4
assert fields_count == 16
assert osm_count >= 4
assert fields_count >= 16


def test_session_called():
Expand Down
4 changes: 2 additions & 2 deletions tests/test_tamu.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ def test_tamu():
zipcode='94105')
assert g.ok
osm_count, fields_count = g.debug()[0]
assert osm_count == 5
assert fields_count == 28
assert osm_count >= 5
assert fields_count >= 28
4 changes: 2 additions & 2 deletions tests/test_tomtom.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ def test_tomtom():
g = geocoder.tomtom(location)
assert g.ok
osm_count, fields_count = g.debug()[0]
assert osm_count == 3
assert fields_count == 13
assert osm_count >= 3
assert fields_count >= 13


def test_multi_results():
Expand Down
2 changes: 1 addition & 1 deletion tests/test_w3w.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def test_w3w():
assert g.ok
osm_count, fields_count = g.debug()[0]
assert osm_count == 0
assert fields_count == 7
assert fields_count >= 7


def test_w3w_reverse():
Expand Down

0 comments on commit 45de274

Please sign in to comment.