From afa9d14630a28ae2a1ec708d66ede29f8bf134c0 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Tue, 2 Mar 2010 03:31:10 +0000 Subject: [PATCH] now that we're using an image cache missing images will not/can not throw --- .../line_pattern_symbolizer_broken.xml | 0 .../missing_icon.xml | 0 .../point_symbolizer_broken.xml | 0 tests/python_tests/object_test.py | 16 ++++++++++------ 4 files changed, 10 insertions(+), 6 deletions(-) rename tests/data/{broken_maps => warning_maps}/line_pattern_symbolizer_broken.xml (100%) rename tests/data/{broken_maps => warning_maps}/missing_icon.xml (100%) rename tests/data/{broken_maps => warning_maps}/point_symbolizer_broken.xml (100%) diff --git a/tests/data/broken_maps/line_pattern_symbolizer_broken.xml b/tests/data/warning_maps/line_pattern_symbolizer_broken.xml similarity index 100% rename from tests/data/broken_maps/line_pattern_symbolizer_broken.xml rename to tests/data/warning_maps/line_pattern_symbolizer_broken.xml diff --git a/tests/data/broken_maps/missing_icon.xml b/tests/data/warning_maps/missing_icon.xml similarity index 100% rename from tests/data/broken_maps/missing_icon.xml rename to tests/data/warning_maps/missing_icon.xml diff --git a/tests/data/broken_maps/point_symbolizer_broken.xml b/tests/data/warning_maps/point_symbolizer_broken.xml similarity index 100% rename from tests/data/broken_maps/point_symbolizer_broken.xml rename to tests/data/warning_maps/point_symbolizer_broken.xml diff --git a/tests/python_tests/object_test.py b/tests/python_tests/object_test.py index ebacc35d5..06017915a 100644 --- a/tests/python_tests/object_test.py +++ b/tests/python_tests/object_test.py @@ -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():