grote / osm2gtfs

Turn OpenStreetMap data and schedule information into GTFS
GNU General Public License v3.0
98 stars 31 forks source link

Acceptance tests for Managua, Nicaragua creator #131

Closed pantierra closed 6 years ago

pantierra commented 6 years ago

Following the work of adding tests for the Accra, Ghana creator by @prhod and @nlehuby, this PR introduces similar acceptance tests for the Managua, Nicaragua creator.

pantierra commented 6 years ago

Running the checks with the new tests of Managua the whole process takes now around 24 minutes in Travis CI. The tests are practically the same as for Accra, but Managua takes longer. I assume (but don't know exactly) it is because it calculates a schedule, whereas Accra relies on frequencies only.

pantierra commented 6 years ago

Rebased on latest master.

grote commented 6 years ago

Looks like the acceptance tests share lots of code with each other, maybe this can be factored out into a super class?

pantierra commented 6 years ago

Yes, basically there are some variables (which files to use for testing, which selector, how many routes and stops are expected to be generated) and the input files (fixtures) that differ. The logic is largely the same.

grote commented 6 years ago

Do you want to do this now or in a separate PR?

pantierra commented 6 years ago

Both is fine for me. Although tend to suggest to accept this PR and then unifying the creator test logic in a separate PR. This way, we make sure that this refactoring is not leading to an regression itself and it will be easier and better for others to review.