diff --git a/tests/visual_tests/compare.py b/tests/visual_tests/compare.py index 5645c3a9b..92bea4ad8 100644 --- a/tests/visual_tests/compare.py +++ b/tests/visual_tests/compare.py @@ -94,10 +94,10 @@ def summary(generate=False): if generate: actual = open(error[1],'r').read() open(error[2],'wb').write(actual) - print "Generating reference image: '%s'" % error[2] + print str(idx+1) + ") Generating reference image: '%s'" % error[2] continue else: - print "Could not verify %s: No reference image found!" % error[1] + print str(idx+1) + ")Could not verify %s: No reference image found!" % error[1] elif isinstance(error[0],int): print str(idx+1) + ") \x1b[34m%s different pixels\x1b[0m:\n\t%s (\x1b[31mactual\x1b[0m)\n\t%s (\x1b[32mexpected\x1b[0m)" % error elif isinstance(error[0],str): diff --git a/tests/visual_tests/test.py b/tests/visual_tests/test.py index affeecb6e..b5c886f19 100755 --- a/tests/visual_tests/test.py +++ b/tests/visual_tests/test.py @@ -102,15 +102,14 @@ def render(filename, width, height, bbox, quiet=False): except Exception, e: sys.stderr.write(e.message + '\n') fail(actual_agg,expected,str(e.message)) - if 'tiff' in actual or 'marker' in actual: + if try_cairo and ('tiff' in actual or 'marker' in actual): actual_cairo = os.path.join(visual_output_dir, '%s-cairo.png' % actual) if not quiet: print "\"%s\" with size %dx%d with cairo..." % (filename, width, height), try: mapnik.render_to_file(m, actual_cairo,'ARGB32') if not os.path.exists(expected): - # generate it on the fly - fail(actual_cairo,expected,None) + pass # will have been generated by agg test else: # cairo and agg differ in alpha for reasons unknown, so don't test it for now diff = compare(actual_cairo, expected, threshold=1, alpha=False)