allow postgres tests to pass if postgres is not running: followup to #2725

This commit is contained in:
Dane Springmeyer 2015-03-06 17:08:29 -08:00
parent 95f98e5311
commit 2143dbe7ef
3 changed files with 4 additions and 4 deletions

View file

@ -53,7 +53,7 @@ def test_can_parse_xml_with_deprecated_properties():
except RuntimeError, e:
# only test datasources that we have installed
if not 'Could not create datasource' in str(e) \
and not 'Bad connection' in str(e):
and not 'could not connect' in str(e):
failures.append('Failed to load valid map %s (%s)' % (filename,e))
eq_(len(failures),0,'\n'+'\n'.join(failures))
mapnik.logger.set_severity(default_logging_severity)
@ -73,7 +73,7 @@ def test_good_files():
except RuntimeError, e:
# only test datasources that we have installed
if not 'Could not create datasource' in str(e) \
and not 'Bad connection' in str(e):
and not 'could not connect' in str(e):
failures.append('Failed to load valid map %s (%s)' % (filename,e))
eq_(len(failures),0,'\n'+'\n'.join(failures))

View file

@ -27,7 +27,7 @@ def compare_map(xml):
except RuntimeError, e:
# only test datasources that we have installed
if not 'Could not create datasource' in str(e) \
and not 'Bad connection' in str(e):
and not 'could not connect' in str(e):
raise RuntimeError(str(e))
return
(handle, test_map) = tempfile.mkstemp(suffix='.xml', prefix='mapnik-temp-map1-')

View file

@ -214,7 +214,7 @@ def render(filename, config, scale_factor, reporting):
return
except Exception, e:
if 'Could not create datasource' in str(e) \
or 'Bad connection' in str(e):
or 'could not connect' in str(e):
return m
reporting.other_error(filename, repr(e))
return m