-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DEV] multiple small corrections & unifications. pylint findings, log…
…ging, comments, unittests (#107) * adjust config for unittest & delete .dbf files - .dbf files are always different. If the file is deleted it will not be compared in unittest * refactor logging output to be consistent with #/+ * only process countries which are involved in the tile - in merge_splitted_tiles_with_land_and_sea() the other ones are note included as well! * refactor .osm.pbf file download - adjust unittests + add new constant unittests * launch-config: STG->gardasee * correct pylint findings - specific exceptions - specific encoding - unittests for the changes above - unified pylint disablement
- Loading branch information
Showing
12 changed files
with
162 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
""" | ||
tests for the downloader file | ||
""" | ||
import unittest | ||
|
||
|
||
from common_python.constants_functions import translate_country_input_to_geofabrik | ||
|
||
|
||
class TestConstants(unittest.TestCase): | ||
""" | ||
tests for constants and constants functions files | ||
""" | ||
|
||
def test_translated_countries_to_china(self): | ||
""" | ||
Test countries which have no own geofabrik country but are included in china | ||
""" | ||
|
||
expected = 'china' | ||
|
||
transl_c = translate_country_input_to_geofabrik('hong_kong') | ||
self.assertEqual(expected, transl_c) | ||
|
||
transl_c = translate_country_input_to_geofabrik('macao') | ||
self.assertEqual(expected, transl_c) | ||
|
||
transl_c = translate_country_input_to_geofabrik('paracel_islands') | ||
self.assertEqual(expected, transl_c) | ||
|
||
def test_translated_countries_no_mapping(self): | ||
""" | ||
Test countries which have no own geofabrik country but are included in china | ||
""" | ||
|
||
expected = 'germany' | ||
|
||
transl_c = translate_country_input_to_geofabrik('germany') | ||
self.assertEqual(expected, transl_c) | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.