now that we're using an image cache missing images will not/can not throw

This commit is contained in:
Dane Springmeyer 2010-03-02 03:31:10 +00:00
parent 4f4c3782d3
commit afa9d14630
4 changed files with 10 additions and 6 deletions

View file

@ -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'))
# ShieldSymbolizer missing image file
@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'))
# images paths are now PathExpressions are evaluated at runtime
# so it does not make sense to throw...
#@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
def test_pointsymbolizer_init():
@ -29,9 +31,11 @@ def test_pointsymbolizer_init():
eq_(p.filename,'../data/images/dummy.png')
# PointSymbolizer missing image file
@raises(RuntimeError)
def test_pointsymbolizer_missing_image():
p = mapnik.PointSymbolizer(mapnik.PathExpression("../data/images/broken.png"))
# images paths are now PathExpressions are evaluated at runtime
# so it does not make sense to throw...
#@raises(RuntimeError)
#def test_pointsymbolizer_missing_image():
# p = mapnik.PointSymbolizer(mapnik.PathExpression("../data/images/broken.png"))
# PointSymbolizer pickling
def test_pointsymbolizer_pickle():