skip load/save map tests when postgis is not running
This commit is contained in:
parent
18910f4c44
commit
fb60492696
2 changed files with 4 additions and 2 deletions
|
@ -51,7 +51,8 @@ def test_good_files():
|
|||
mapnik.load_map_from_string(m,open(filename,'rb').read(),strict,base_path)
|
||||
except RuntimeError, e:
|
||||
# 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) \
|
||||
and not 'Bad connection' in str(e):
|
||||
failures.append('Failed to load valid map %s (%s)' % (filename,e))
|
||||
eq_(len(failures),0,'\n'+'\n'.join(failures))
|
||||
|
||||
|
|
|
@ -26,7 +26,8 @@ def compare_map(xml):
|
|||
mapnik.load_map(m, xml, False, absolute_base)
|
||||
except RuntimeError, e:
|
||||
# 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) \
|
||||
and not 'Bad connection' in str(e):
|
||||
raise RuntimeError(str(e))
|
||||
return
|
||||
(handle, test_map) = tempfile.mkstemp(suffix='.xml', prefix='mapnik-temp-map1-')
|
||||
|
|
Loading…
Reference in a new issue