all tests in trunk should now pass with this update to the shield_symbolizer init test
This commit is contained in:
parent
34f0ac32ef
commit
34224c7a39
1 changed files with 29 additions and 30 deletions
|
@ -10,42 +10,41 @@ import mapnik2, pickle
|
|||
# ShieldSymbolizer initialization
|
||||
def test_shieldsymbolizer_init():
|
||||
s = mapnik2.ShieldSymbolizer(mapnik2.Expression('[Field Name]'), 'DejaVu Sans Bold', 6, mapnik2.Color('#000000'), mapnik2.PathExpression('../data/images/dummy.png'))
|
||||
eq_(s.get_anchor(), [])
|
||||
eq_(s.get_displacement(), [])
|
||||
eq_(s.get_anchor(), [0.0,0.5])
|
||||
eq_(s.get_displacement(), [0.0,0.0])
|
||||
eq_(s.allow_overlap, False)
|
||||
eq_(s.avoid_edges,False)
|
||||
eq_(s.character_spacing,1)
|
||||
eq_(ts.name, ts2.name)
|
||||
eq_(ts.face_name, ts2.face_name)
|
||||
eq_(ts.allow_overlap, ts2.allow_overlap)
|
||||
eq_(ts.get_displacement(), ts2.get_displacement())
|
||||
eq_(ts.get_anchor(), ts2.get_anchor())
|
||||
eq_(ts.fill, ts2.fill)
|
||||
eq_(ts.force_odd_labels, ts2.force_odd_labels)
|
||||
eq_(ts.halo_fill, ts2.halo_fill)
|
||||
eq_(ts.halo_radius, ts2.halo_radius)
|
||||
eq_(ts.label_placement, ts2.label_placement)
|
||||
eq_(ts.minimum_distance, ts2.minimum_distance)
|
||||
eq_(ts.text_ratio, ts2.text_ratio)
|
||||
eq_(ts.text_size, ts2.text_size)
|
||||
eq_(ts.wrap_width, ts2.wrap_width)
|
||||
eq_(ts.vertical_alignment, ts2.vertical_alignment)
|
||||
eq_(ts.label_spacing, ts2.label_spacing)
|
||||
eq_(ts.label_position_tolerance, ts2.label_position_tolerance)
|
||||
eq_(s.avoid_edges, False)
|
||||
eq_(s.character_spacing,0)
|
||||
eq_(str(s.name), str(mapnik2.Expression('[Field Name]')))
|
||||
eq_(s.face_name, 'DejaVu Sans Bold')
|
||||
eq_(s.allow_overlap, False)
|
||||
eq_(s.fill, mapnik2.Color('#000000'))
|
||||
eq_(s.force_odd_labels, False)
|
||||
eq_(s.halo_fill, mapnik2.Color('rgb(255,255,255)'))
|
||||
eq_(s.halo_radius, 0)
|
||||
eq_(s.label_placement, mapnik2.label_placement.POINT_PLACEMENT)
|
||||
eq_(s.minimum_distance, 0.0)
|
||||
eq_(s.text_ratio, 0)
|
||||
eq_(s.text_size, 6)
|
||||
eq_(s.wrap_width, 0)
|
||||
eq_(s.vertical_alignment, mapnik2.vertical_alignment.MIDDLE)
|
||||
eq_(s.label_spacing, 0)
|
||||
eq_(s.label_position_tolerance, 0)
|
||||
|
||||
eq_(ts.wrap_character, ts2.wrap_character)
|
||||
eq_(ts.text_transform, ts2.text_transform)
|
||||
eq_(ts.line_spacing, ts2.line_spacing)
|
||||
eq_(ts.character_spacing, ts2.character_spacing)
|
||||
eq_(s.wrap_character, ' ')
|
||||
eq_(s.text_transform, mapnik2.text_transform.NONE)
|
||||
eq_(s.line_spacing, 0)
|
||||
eq_(s.character_spacing, 0)
|
||||
|
||||
# r1341
|
||||
eq_(ts.wrap_before, ts2.wrap_before)
|
||||
eq_(ts.horizontal_alignment, ts2.horizontal_alignment)
|
||||
eq_(ts.justify_alignment, ts2.justify_alignment)
|
||||
eq_(ts.opacity, ts2.opacity)
|
||||
eq_(s.wrap_before, False)
|
||||
eq_(s.horizontal_alignment, mapnik2.horizontal_alignment.MIDDLE)
|
||||
eq_(s.justify_alignment, mapnik2.justify_alignment.MIDDLE)
|
||||
eq_(s.opacity, 1.0)
|
||||
|
||||
|
||||
raise Todo("FontSet pickling support needed: http://trac.mapnik2.org/ticket/348")
|
||||
eq_(ts.fontset, ts2.fontset)
|
||||
eq_(s.fontset, '')
|
||||
|
||||
|
||||
# ShieldSymbolizer missing image file
|
||||
|
|
Loading…
Reference in a new issue