aboutsummaryrefslogtreecommitdiff
path: root/diplomacy/maps/tests/test_map_gen.py
diff options
context:
space:
mode:
authorPhilip Paquette <pcpaquette@gmail.com>2019-09-09 17:57:09 -0400
committerPhilip Paquette <pcpaquette@gmail.com>2019-09-10 09:09:25 -0400
commit1606653546958fd6d621809ab3cfdc8c5e7b8494 (patch)
treefe779b03267cd99cecab9812a03aefe5068d1ad3 /diplomacy/maps/tests/test_map_gen.py
parent55c1b225e22a5ce2da1c405fee99ea4315541962 (diff)
Added ability to load a custom map by specifying the path to a '.map' file
Diffstat (limited to 'diplomacy/maps/tests/test_map_gen.py')
-rw-r--r--diplomacy/maps/tests/test_map_gen.py9
1 files changed, 9 insertions, 0 deletions
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