move colorizer tests to visual suite

This commit is contained in:
Dane Springmeyer 2013-09-25 14:08:47 -07:00
parent 8d79008e9e
commit 09544849b9
11 changed files with 277 additions and 19 deletions

View file

@ -9,22 +9,6 @@ def setup():
# from another directory we need to chdir() # from another directory we need to chdir()
os.chdir(execution_path('.')) os.chdir(execution_path('.'))
def test_gen_map():
mapxmlfile = '../data/good_maps/raster_colorizer.xml'
mapxmloutputfile = 'raster_colorizer_test_save.xml'
outputfile = 'raster_colorizer_test.png'
m = mapnik.Map(800, 600)
try:
mapnik.load_map(m, mapxmlfile)
mapnik.save_map(m, mapxmloutputfile)
m.zoom_all()
mapnik.render_to_file(m, outputfile)
except RuntimeError,e:
# only test datasources that we have installed
if not 'Could not create datasource' in str(e):
raise RuntimeError(str(e))
#test discrete colorizer mode #test discrete colorizer mode
def test_get_color_discrete(): def test_get_color_discrete():
#setup #setup

View file

@ -90,7 +90,7 @@ def test_dataraster_query_point():
def test_load_save_map(): def test_load_save_map():
map = mapnik.Map(256,256) map = mapnik.Map(256,256)
in_map = "../data/good_maps/raster_symbolizer.xml" in_map = "../visual_tests/styles/raster_symbolizer.xml"
try: try:
mapnik.load_map(map, in_map) mapnik.load_map(map, in_map)

View file

@ -0,0 +1,136 @@
{
"keys": [
""
],
"data": {},
"grid": [
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "
]
}

View file

@ -0,0 +1,136 @@
{
"keys": [
""
],
"data": {},
"grid": [
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View file

@ -62,7 +62,7 @@
<Layer name="dataraster" srs="+init=epsg:32630"> <Layer name="dataraster" srs="+init=epsg:32630">
<StyleName>DISCRETE RAINBOW</StyleName> <StyleName>DISCRETE RAINBOW</StyleName>
<Datasource> <Datasource>
<Parameter name="file">../raster/dataraster.tif</Parameter> <Parameter name="file">../../data/raster/dataraster.tif</Parameter>
<Parameter name="type">gdal</Parameter> <Parameter name="type">gdal</Parameter>
<Parameter name="band">1</Parameter> <Parameter name="band">1</Parameter>
</Datasource> </Datasource>

View file

@ -26,7 +26,7 @@
<StyleName>ramped</StyleName> <StyleName>ramped</StyleName>
<Datasource> <Datasource>
<!-- get stats on this file with gdalinfo ../raster/dataraster.tif -stats --> <!-- get stats on this file with gdalinfo ../raster/dataraster.tif -stats -->
<Parameter name="file">../raster/dataraster.tif</Parameter> <Parameter name="file">../../data/raster/dataraster.tif</Parameter>
<Parameter name="type">gdal</Parameter> <Parameter name="type">gdal</Parameter>
<Parameter name="band">1</Parameter> <Parameter name="band">1</Parameter>
</Datasource> </Datasource>

View file

@ -177,6 +177,8 @@ files = {
'tiff_colortable':{'sizes':[(256,256)]}, 'tiff_colortable':{'sizes':[(256,256)]},
'tiff_colortable_custom_nodata':{'sizes':[(256,256)]}, 'tiff_colortable_custom_nodata':{'sizes':[(256,256)]},
'vrt_colortable':{'sizes':[(256,256)]}, 'vrt_colortable':{'sizes':[(256,256)]},
'raster_colorizer':{'sizes':[(512,512)]},
'raster_symbolizer':{'sizes':[(512,512)]},
} }
class Reporting: class Reporting: