Skip to content

Detail and readability of failure reporting #13

@jfgigand

Description

@jfgigand

Hi,

It looks like that geocoder-tester does not specify what property is incorrect from a result.
It prints all exepected/result properties as pipe-separated values.

Thus, question 1 is: how can we improve report readability?

From the example below, there is a conflict between 19B and 19 BIS. The latter is the preferred way for speaking to the end user, while the latter is standard-compliant. The same difference occurs for R/RUE, AV/AVENUE, etc.

Question 2 is: how can we enable geocoder to tolerate these different spellings?

Thank you!

$ py.test geocoder_tester/world/france/iledefrance/ --tb long --api-url http://api-adresse.data.gouv.fr/search/ --max-run 50 --save-report /tmp/report.log -x
========================================= test session starts =========================================
platform linux -- Python 3.4.3, pytest-3.0.1, py-1.4.31, pluggy-0.3.1 -- /tmp/python3-env/bin/python3
cachedir: .cache
rootdir: /tmp/geocoder-tester, inifile: pytest.ini
collected 2093 items 

geocoder_tester/world/france/iledefrance/test_addresses.csv::34 Avenue de l'Op\xe9ra Paris PASSED
geocoder_tester/world/france/iledefrance/test_addresses.csv::34 Avenue de l'Op\xe9ra 75002 PASSED
geocoder_tester/world/france/iledefrance/test_addresses.csv::34 Avenue de l'Op\xe9ra PASSED
geocoder_tester/world/france/iledefrance/test_addresses.csv::19B Rue des Deux Ponts Paris FAILED

============================================== FAILURES ===============================================
________________________________ Search: 19B Rue des Deux Ponts Paris _________________________________
\nSearch failed\n# Search was: 19B Rue des Deux Ponts Paris\n# Params was: limit: 1\n#\xa0Expected was: postcode: 75004 | name: 19B Rue des Deux Ponts\n#\xa0Results were:\nname               | osm_key | osm_value | osm_id | housenumber | street      | postcode | city             | country | lat       | lon       | distance\n------------------ | ------- | --------- | ------ | ----------- | ----------- | -------- | ---------------- | ------- | --------- | --------- | --------\n19 BIS Rue du Pont | \u2014       | \u2014         | \u2014      | 19 BIS      | Rue du Pont | 85000    | La Roche-sur-Yon | \u2014       | 46.667819 | -1.434497 | \u2014       \n
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
================================= 1 failed, 3 passed in 0.80 seconds ==================================

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions