From 1606653546958fd6d621809ab3cfdc8c5e7b8494 Mon Sep 17 00:00:00 2001 From: Philip Paquette Date: Mon, 9 Sep 2019 17:57:09 -0400 Subject: Added ability to load a custom map by specifying the path to a '.map' file --- diplomacy/maps/tests/test_map_gen.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'diplomacy/maps') diff --git a/diplomacy/maps/tests/test_map_gen.py b/diplomacy/maps/tests/test_map_gen.py index 84884db..48084fb 100644 --- a/diplomacy/maps/tests/test_map_gen.py +++ b/diplomacy/maps/tests/test_map_gen.py @@ -34,3 +34,12 @@ def test_map_creation(): this_map = Map(map_name) assert this_map.error == [], 'Map %s should have no errors' % map_name del this_map + +def test_map_with_full_path(): + """ Tests for map creation """ + maps = glob.glob(os.path.join(MODULE_PATH, 'maps', '*.map')) + assert maps, 'Expected maps to be found.' + for current_map in maps: + this_map = Map(current_map) + assert this_map.error == [], 'Map %s should have no errors' % current_map + del this_map -- cgit v1.2.3