Skip to content

Commit

Permalink
Abstract creator test classes to share common logic between creators
Browse files Browse the repository at this point in the history
  • Loading branch information
Felix Delattre authored and grote committed Mar 30, 2018
1 parent bc0a5ca commit b7b6b4f
Show file tree
Hide file tree
Showing 10 changed files with 499 additions and 537 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ jobs:
script: pylint --disable=C,R osm2gtfs

- stage: non regression test
script: python -m unittest discover
script: python -m unittest discover -p 'tests_*.py'
2 changes: 2 additions & 0 deletions osm2gtfs/core/osm_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,7 @@ def _query_routes(self):
/* Return tags for elements and roles for relation members. */
);out body;""" % (self.tags, self.bbox)
print(query_str)
return api.query(query_str)

def _query_stops(self):
Expand Down Expand Up @@ -622,6 +623,7 @@ def _query_stops(self):
rel(bn:"platform")["public_transport"="stop_area"];
out body;
);""" % (self.tags, self.bbox)
print(query_str)
return api.query(query_str)

def _generate_shape(self, route_variant, query_result_set):
Expand Down
2 changes: 1 addition & 1 deletion osm2gtfs/tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ osm2gtfs tests

To run all the tests (from the root `osm2gtfs` folder) :

$ python -m unittest discover -v -t .
python -m unittest discover -v -p 'tests_*.py' .

## Core

Expand Down
Loading

0 comments on commit b7b6b4f

Please sign in to comment.