Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core tests #116

Open
pantierra opened this issue Dec 23, 2017 · 2 comments
Open

Core tests #116

pantierra opened this issue Dec 23, 2017 · 2 comments

Comments

@pantierra
Copy link
Contributor

Coming from the issue on regression tests #75, it probably makes sense to plan a bit on the tests for the code pieces living in the directory core of osm2gtfs.

@pantierra
Copy link
Contributor Author

Let's have a quick overview of what we've got here and some brainstormy briefings; please add what I'm missing or correct in what is wrong or can be improved:

  • cache.py: Tests should be straightforward. Basically caching and restoring and comparing those. Based on the mock-up data.
  • configuration.py: Also straightforward, based on mock-up data it creates an Configuration object and verifies it's attributes.
  • creator_factory.py: Should test if the factory process works and also include tests for making sure that creators stick to the naming conventions, etc.
  • elements.py: On the programming side, it seems to be straightforward, as basically the different objects of Line, Itinerary, Station and Stop needs to be build by mock-up data (overpass result objects) and checked for their attributes. However I think the challenge and power of this part is actually in building good mock-up data. The different data here is concretely reflecting use cases, for example having routes with route_master, some without; some stops united in a stop_area and some not, etc...
  • helper.py: Tests for the particular static functions are straightforward to write.
  • osm_connector.py: This is a very interesting one. How to test the OSM connector? Data may change on OSM and we have to verify if querying and other things are working. Probably we have to think about suitable overpass queries to test particular functions of this module.

@pantierra
Copy link
Contributor Author

creator_factory tests are included in #83.

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

No branches or pull requests

1 participant