diff --git a/tests/azure-pipelines/azure-pipelines.yml b/tests/azure-pipelines/azure-pipelines.yml index 7e0126a..b0e2426 100644 --- a/tests/azure-pipelines/azure-pipelines.yml +++ b/tests/azure-pipelines/azure-pipelines.yml @@ -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" @@ -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 \ No newline at end of file diff --git a/tests/python/test_osm_converter.py b/tests/python/test_osm_converter.py index 391d38f..38d9326 100644 --- a/tests/python/test_osm_converter.py +++ b/tests/python/test_osm_converter.py @@ -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__':