symerio / pgeocode

Postal code geocoding and distance calculation
https://pgeocode.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
238 stars 58 forks source link

corrected inconsistent name in 'country code' column name #35

Closed dword4 closed 4 years ago

dword4 commented 4 years ago

https://github.com/symerio/pgeocode/issues/33

Test run before any change

======================================================================================= test session starts ========================================================================================
platform linux -- Python 3.6.8, pytest-5.4.1, py-1.8.1, pluggy-0.13.1
rootdir: /home/dhynes/fix/pgeocode
collected 95 items

test_pgeocode.py ......x...sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss.s                                                                             [100%]

============================================================================ 10 passed, 84 skipped, 1 xfailed in 42.45s ============================================================================

updated the column to use an underscore and re-tested

======================================================================================= test session starts ========================================================================================
platform linux -- Python 3.6.8, pytest-5.4.1, py-1.8.1, pluggy-0.13.1
rootdir: /home/dhynes/fix/pgeocode
collected 95 items

test_pgeocode.py ......x...sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss.s                                                                             [100%]

============================================================================ 10 passed, 84 skipped, 1 xfailed in 14.18s ============================================================================

The other error at the very end of the description on that Issue seems to be one thats outside of the scope of this I think so I didn't address it as that would probably involve changing how errors are handled.

rth commented 4 years ago

LGTM, could you just please add an assertion e.g. after https://github.com/symerio/pgeocode/blob/5b5d68c3f9b468e04dc3211f9f91aaa453a38db5/test_pgeocode.py#L56-L57

that the returned pandas.Series indeed has a country_code field. Thanks @dword4 !

rth commented 4 years ago

Thanks @dword4 !