Update python tests.
This commit is contained in:
parent
f7a387f8af
commit
fe2879ac42
3 changed files with 6 additions and 1 deletions
BIN
tests/visual_tests/images/python-Format-reference.png
Normal file
BIN
tests/visual_tests/images/python-Format-reference.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.9 KiB |
BIN
tests/visual_tests/images/python-List-reference.png
Normal file
BIN
tests/visual_tests/images/python-List-reference.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.5 KiB |
|
@ -2,7 +2,7 @@
|
||||||
import mapnik
|
import mapnik
|
||||||
import sys
|
import sys
|
||||||
import os.path
|
import os.path
|
||||||
import compare
|
from compare import compare, summary
|
||||||
|
|
||||||
class MyText(mapnik.FormattingNode):
|
class MyText(mapnik.FormattingNode):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
@ -98,3 +98,8 @@ format_trees = [
|
||||||
for format_tree in format_trees:
|
for format_tree in format_trees:
|
||||||
text.placements.defaults.format_tree = format_tree[1]
|
text.placements.defaults.format_tree = format_tree[1]
|
||||||
mapnik.render_to_file(m, os.path.join("images", 'python-%s.png' % format_tree[0]), 'png')
|
mapnik.render_to_file(m, os.path.join("images", 'python-%s.png' % format_tree[0]), 'png')
|
||||||
|
compare(os.path.join("images", 'python-%s.png' % format_tree[0]),
|
||||||
|
os.path.join("images", 'python-%s-reference.png' % format_tree[0])
|
||||||
|
)
|
||||||
|
|
||||||
|
summary()
|
||||||
|
|
Loading…
Add table
Reference in a new issue