refined the unit test data source logic
This commit is contained in:
parent
ed39efcfcb
commit
264407b259
3 changed files with 30 additions and 33 deletions
|
@ -28,10 +28,7 @@ def test_adding_datasource_to_layer():
|
|||
|
||||
</Map>
|
||||
'''
|
||||
if 'shape' not in mapnik.DatasourceCache.plugin_names():
|
||||
print "skipping test_adding_datasource_to_layer because \"shape\" plugin is not available"
|
||||
return
|
||||
|
||||
if 'shape' in mapnik.DatasourceCache.plugin_names():
|
||||
m = mapnik.Map(256, 256)
|
||||
|
||||
mapnik.load_map_from_string(m, map_string)
|
||||
|
|
|
@ -48,7 +48,7 @@ def test_good_files():
|
|||
if have_inputs:
|
||||
good_files.append(xmlfile)
|
||||
else:
|
||||
print 'Notice: skipping load_map_test for %s due to missing input plugins: %s' % (os.path.basename(xmlfile), list(missing_plugins))
|
||||
print 'Notice: skipping load_map_test for %s due to unavailable input plugins: %s' % (os.path.basename(xmlfile), list(missing_plugins))
|
||||
|
||||
failures = [];
|
||||
strict = False
|
||||
|
|
|
@ -23,7 +23,7 @@ def compare_map(xmlfile):
|
|||
missing_plugins = set()
|
||||
have_inputs = datasources_available(xmlfile, missing_plugins)
|
||||
if not have_inputs:
|
||||
print 'Notice: skipping saved map comparison for %s due to missing input plugins: %s' % (os.path.basename(xmlfile), list(missing_plugins))
|
||||
print 'Notice: skipping saved map comparison for %s due to unavailable input plugins: %s' % (os.path.basename(xmlfile), list(missing_plugins))
|
||||
return False
|
||||
|
||||
m = mapnik.Map(256, 256)
|
||||
|
|
Loading…
Add table
Reference in a new issue