now that we're using an image cache missing images will not/can not throw
This commit is contained in:
parent
4f4c3782d3
commit
afa9d14630
4 changed files with 10 additions and 6 deletions
|
@ -12,9 +12,11 @@ def test_shieldsymbolizer_init():
|
||||||
s = mapnik.ShieldSymbolizer(mapnik.Expression('[Field Name]'), 'DejaVu Sans Bold', 6, mapnik.Color('#000000'), mapnik.PathExpression('../data/images/dummy.png'))
|
s = mapnik.ShieldSymbolizer(mapnik.Expression('[Field Name]'), 'DejaVu Sans Bold', 6, mapnik.Color('#000000'), mapnik.PathExpression('../data/images/dummy.png'))
|
||||||
|
|
||||||
# ShieldSymbolizer missing image file
|
# ShieldSymbolizer missing image file
|
||||||
@raises(RuntimeError)
|
# images paths are now PathExpressions are evaluated at runtime
|
||||||
def test_shieldsymbolizer_missing_image():
|
# so it does not make sense to throw...
|
||||||
s = mapnik.ShieldSymbolizer(mapnik.Expression('[Field Name]'), 'DejaVu Sans Bold', 6, mapnik.Color('#000000'), mapnik.PathExpression('../data/images/broken.png'))
|
#@raises(RuntimeError)
|
||||||
|
#def test_shieldsymbolizer_missing_image():
|
||||||
|
# s = mapnik.ShieldSymbolizer(mapnik.Expression('[Field Name]'), 'DejaVu Sans Bold', 6, mapnik.Color('#000000'), mapnik.PathExpression('../#data/images/broken.png'))
|
||||||
|
|
||||||
# PointSymbolizer initialization
|
# PointSymbolizer initialization
|
||||||
def test_pointsymbolizer_init():
|
def test_pointsymbolizer_init():
|
||||||
|
@ -29,9 +31,11 @@ def test_pointsymbolizer_init():
|
||||||
eq_(p.filename,'../data/images/dummy.png')
|
eq_(p.filename,'../data/images/dummy.png')
|
||||||
|
|
||||||
# PointSymbolizer missing image file
|
# PointSymbolizer missing image file
|
||||||
@raises(RuntimeError)
|
# images paths are now PathExpressions are evaluated at runtime
|
||||||
def test_pointsymbolizer_missing_image():
|
# so it does not make sense to throw...
|
||||||
p = mapnik.PointSymbolizer(mapnik.PathExpression("../data/images/broken.png"))
|
#@raises(RuntimeError)
|
||||||
|
#def test_pointsymbolizer_missing_image():
|
||||||
|
# p = mapnik.PointSymbolizer(mapnik.PathExpression("../data/images/broken.png"))
|
||||||
|
|
||||||
# PointSymbolizer pickling
|
# PointSymbolizer pickling
|
||||||
def test_pointsymbolizer_pickle():
|
def test_pointsymbolizer_pickle():
|
||||||
|
|
Loading…
Reference in a new issue