Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Make doctests more resilient to API data changes #84

Closed
perrygeo opened this issue Dec 4, 2015 · 0 comments
Closed

Make doctests more resilient to API data changes #84

perrygeo opened this issue Dec 4, 2015 · 0 comments

Comments

@perrygeo
Copy link
Contributor

perrygeo commented Dec 4, 2015

This doctest is suddenly failing, most likely due to changes in the geocoder data.

=================================== FAILURES ===================================
_________________________ [doctest] docs/geocoding.md __________________________
150 ## Reverse geocoding
151 
152 Places at a longitude, latitude point may be found using `Geocoder.reverse()`.
153 
154 ```python
155 
156 >>> response = geocoder.reverse(lon=-73.989, lat=40.733)
157 >>> response.status_code
158 200
159 >>> for f in response.geojson()['features']:
Differences (unified diff with -expected +actual):
    @@ -1,5 +1,5 @@
     Atlas Installation, 124 E 13th St, New York, New York 10003, United States: poi.2701346205
     Gramercy-Flatiron, New York, 10003, New York, United States: neighborhood.21161
    -New York, New York, United States: place.37501
    +New York, New York, United States: place.34530
     10003, New York, United States: postcode.2254639497
     New York, United States: region.628083222
/home/travis/build/mapbox/mapbox-sdk-py/docs/geocoding.md:159: DocTestFailure
===================== 1 failed, 1 skipped in 0.19 seconds ======================

Fixing manually for now but we should anticipate this happening fairly regularly and make the tests more resilient.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant