tests: re-enable strict map loading tests
This commit is contained in:
parent
523cb96e22
commit
c7879755f4
1 changed files with 2 additions and 2 deletions
|
@ -45,14 +45,14 @@ def test_good_files():
|
||||||
for filename in good_files:
|
for filename in good_files:
|
||||||
try:
|
try:
|
||||||
m = mapnik.Map(512, 512)
|
m = mapnik.Map(512, 512)
|
||||||
strict = False
|
strict = True
|
||||||
mapnik.load_map(m, filename, strict)
|
mapnik.load_map(m, filename, strict)
|
||||||
base_path = os.path.dirname(filename)
|
base_path = os.path.dirname(filename)
|
||||||
mapnik.load_map_from_string(m,open(filename,'rb').read(),strict,base_path)
|
mapnik.load_map_from_string(m,open(filename,'rb').read(),strict,base_path)
|
||||||
except RuntimeError, e:
|
except RuntimeError, e:
|
||||||
# only test datasources that we have installed
|
# only test datasources that we have installed
|
||||||
if not 'Could not create datasource' in str(e):
|
if not 'Could not create datasource' in str(e):
|
||||||
failures.append('Failed to load valid map (%s)!' % filename)
|
failures.append('Failed to load valid map %s (%s)' % (filename,e))
|
||||||
eq_(len(failures),0,'\n'+'\n'.join(failures))
|
eq_(len(failures),0,'\n'+'\n'.join(failures))
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
Loading…
Reference in a new issue