Update tests.

This commit is contained in:
Hermann Kraus 2012-01-28 19:37:13 +01:00
parent a3871e52b7
commit 2d50c840fe
2 changed files with 3 additions and 4 deletions

View file

@ -24,7 +24,6 @@ def test_line_symbolizer_init():
# ShieldSymbolizer initialization # ShieldSymbolizer initialization
def test_shieldsymbolizer_init(): 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'))
eq_(s.anchor, (0.0,0.5,))
eq_(s.displacement, (0.0,0.0)) eq_(s.displacement, (0.0,0.0))
eq_(s.allow_overlap, False) eq_(s.allow_overlap, False)
eq_(s.avoid_edges, False) eq_(s.avoid_edges, False)
@ -41,7 +40,7 @@ def test_shieldsymbolizer_init():
eq_(s.text_ratio, 0) eq_(s.text_ratio, 0)
eq_(s.text_size, 6) eq_(s.text_size, 6)
eq_(s.wrap_width, 0) eq_(s.wrap_width, 0)
eq_(s.vertical_alignment, mapnik.vertical_alignment.MIDDLE) eq_(s.vertical_alignment, mapnik.vertical_alignment.AUTO)
eq_(s.label_spacing, 0) eq_(s.label_spacing, 0)
eq_(s.label_position_tolerance, 0) eq_(s.label_position_tolerance, 0)
# 22.5 * M_PI/180.0 initialized by default # 22.5 * M_PI/180.0 initialized by default
@ -54,7 +53,7 @@ def test_shieldsymbolizer_init():
# r1341 # r1341
eq_(s.wrap_before, False) eq_(s.wrap_before, False)
eq_(s.horizontal_alignment, mapnik.horizontal_alignment.MIDDLE) eq_(s.horizontal_alignment, mapnik.horizontal_alignment.AUTO)
eq_(s.justify_alignment, mapnik.justify_alignment.MIDDLE) eq_(s.justify_alignment, mapnik.justify_alignment.MIDDLE)
eq_(s.opacity, 1.0) eq_(s.opacity, 1.0)

View file

@ -74,6 +74,7 @@ def test_linesymbolizer_pickle():
# TextSymbolizer pickling # TextSymbolizer pickling
def test_textsymbolizer_pickle(): def test_textsymbolizer_pickle():
raise Todo("text_symbolizer pickling currently disabled")
ts = mapnik.TextSymbolizer(mapnik.Expression('[Field_Name]'), 'Font Name', 8, mapnik.Color('black')) ts = mapnik.TextSymbolizer(mapnik.Expression('[Field_Name]'), 'Font Name', 8, mapnik.Color('black'))
eq_(str(ts.name), str(mapnik.Expression('[Field_Name]'))) eq_(str(ts.name), str(mapnik.Expression('[Field_Name]')))
@ -81,7 +82,6 @@ def test_textsymbolizer_pickle():
eq_(ts.text_size, 8) eq_(ts.text_size, 8)
eq_(ts.fill, mapnik.Color('black')) eq_(ts.fill, mapnik.Color('black'))
raise Todo("text_symbolizer pickling currently disabled")
ts2 = pickle.loads(pickle.dumps(ts,pickle.HIGHEST_PROTOCOL)) ts2 = pickle.loads(pickle.dumps(ts,pickle.HIGHEST_PROTOCOL))
eq_(ts.name, ts2.name) eq_(ts.name, ts2.name)