Skip to content

Commit

Permalink
Add osm2cityflow test
Browse files Browse the repository at this point in the history
  • Loading branch information
only-changer committed Oct 23, 2019
1 parent 241d12c commit 5bf2601
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/azure-pipelines/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ stages:
python_version: '3.7'
cxx_standard: '14'
target: 'all test'
- script: cp build/cityflow* . && python3.7 -m unittest discover tests/python/
- script: python3.7 -m pip install pyproj folium && cp build/cityflow* . && git clone https://github.com/cityflow-project/data.git && python3.7 -m unittest discover tests/python/
displayName: Python tests

- job: "osx"
Expand All @@ -101,5 +101,5 @@ stages:
python_version: '3'
cxx_standard: '14'
target: 'all test'
- script: cp build/cityflow* . && python3 -m unittest discover tests/python/
- script: python3 -m pip install pyproj folium && cp build/cityflow* . && git clone https://github.com/cityflow-project/data.git && python3 -m unittest discover tests/python/
displayName: Python tests
8 changes: 7 additions & 1 deletion tests/python/test_osm_converter.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
import unittest
import os
from tools.converter.osm2cityflow import extract, draw


class TestOsmConverter(unittest.TestCase):
dataPath = os.getcwd() + '/data/tools/Converter/examples/'
osmFile = dataPath + 'statecollege.osm'
CityFlowFile = dataPath + 'statecollege_roadnet.json'

def test_converter(self):
pass
nodes = extract(osmFile=self.osmFile)
draw(nodes, self.CityFlowFile, True)


if __name__ == '__main__':
Expand Down

0 comments on commit 5bf2601

Please sign in to comment.