fixup fontset tests

This commit is contained in:
Dane Springmeyer 2011-12-22 12:48:11 -08:00
parent b820cf7807
commit 84b7d198d4
3 changed files with 10 additions and 4 deletions

View file

@ -0,0 +1,7 @@
<Map>
<FontSet name="book-fonts">
<Font face-name="does not exist" />
</FontSet>
</Map>

View file

@ -3,7 +3,6 @@
<FontSet name="book-fonts">
<Font face-name="DejaVu Sans Book" />
<Font face-name="DejaVu Sans Oblique" />
<Font face-name="does not exist" />
</FontSet>
</Map>

View file

@ -13,10 +13,10 @@ def setup():
def test_loading_fontset_from_map():
m = mapnik.Map(256,256)
mapnik.load_map(m,'../data/good_maps/fontset.xml')
mapnik.load_map(m,'../data/good_maps/fontset.xml',True)
fs = m.find_fontset('book-fonts')
eq_(len(fs.names),3)
eq_(list(fs.names),['DejaVu Sans Book','DejaVu Sans Oblique', 'does not exist'])
eq_(len(fs.names),2)
eq_(list(fs.names),['DejaVu Sans Book','DejaVu Sans Oblique'])
if __name__ == "__main__":