3
from nose.tools import *
4
from utilities import execution_path
6
import os, sys, glob, mapnik
9
# All of the paths used are relative, if we run the tests
10
# from another directory we need to chdir()
11
os.chdir(execution_path('.'))
14
# TODO: Write a better test
15
# 1. Construct map in memory
17
# 3. Load map to a second object
18
# 4. Compare both map objects
19
map = mapnik.Map(256, 256)
20
in_map = "../data/good_maps/osm-styles.xml"
22
mapnik.load_map(map, in_map)
23
test_map = "test_map.xml"
25
mapnik.save_map(map, test_map)
26
new_map = mapnik.Map(256, 256)
28
mapnik.load_map(new_map, test_map)
30
if os.path.exists(test_map):
33
# Fail, the map wasn't written