Skip to content

Commit

Permalink
Merge 16c61ff into cf7a329
Browse files Browse the repository at this point in the history
  • Loading branch information
idlesign committed Feb 9, 2024
2 parents cf7a329 + 16c61ff commit ad40c1f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pysyge/pysyge.py
Expand Up @@ -146,7 +146,7 @@ def _search_idx(self, ipn: bytes, min_: int, max_: int) -> int:

min_ += 1

if min_ >= max_:
if min_ > max_:
break

else:
Expand Down
4 changes: 4 additions & 0 deletions tests/test_module.py
Expand Up @@ -27,6 +27,10 @@ def test_quirks():
result = geodata.get_location('109.207.230.244')
assert result['city'] == 'Калининград'

geodata = pysyge.GeoLocator(DATABASE_CITY_FILE, pysyge.MODE_BATCH)
result = geodata.get_location('109.252.119.71', detailed=True)
assert result['info']['city']['name_en'] == 'Moscow'


class TestGeoLocatorBasicCheck:

Expand Down

0 comments on commit ad40c1f

Please sign in to comment.