tests: warn if no datasources are found

This commit is contained in:
Dane Springmeyer 2011-11-11 17:03:56 -08:00
parent 6f665bf7ec
commit 9022cf8a68

View file

@ -10,6 +10,10 @@ def setup():
# from another directory we need to chdir()
os.chdir(execution_path('.'))
def test_that_datasources_exist():
if len(mapnik2.DatasourceCache.instance().plugin_names()) == 0:
print '***NOTICE*** - no datasource plugins have been loaded'
def test_field_listing():
lyr = mapnik2.Layer('test')
if 'shape' in mapnik2.DatasourceCache.instance().plugin_names():