diff options
author | Don Bright <hugh.m.bright@gmail.com> | 2011-12-07 03:48:19 (GMT) |
---|---|---|
committer | Don Bright <hugh.m.bright@gmail.com> | 2011-12-07 03:48:19 (GMT) |
commit | 61bfb8f058e8935432fed6098a1d70dba194f6bf (patch) | |
tree | a4736aa61f2759cb7781fc94cd448aff6374bfd6 /tests/test_cmdline_tool.py | |
parent | 32a3831ce9c8894a24d9a5f05c46c3fba458d34c (diff) |
fix errors with flaky wiki sites. cleanup
Diffstat (limited to 'tests/test_cmdline_tool.py')
-rwxr-xr-x | tests/test_cmdline_tool.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/test_cmdline_tool.py b/tests/test_cmdline_tool.py index 916694f..480584c 100755 --- a/tests/test_cmdline_tool.py +++ b/tests/test_cmdline_tool.py @@ -82,16 +82,16 @@ def compare_png(resultfilename): # for systems with older imagemagick that doesnt support '-morphology' # http://www.imagemagick.org/Usage/morphology/#alturnative - # args = [expectedfilename, resultfilename, "-alpha", "Off", "-compose", "difference", "-composite", "-threshold", "10%", "-gaussian-blur","3x65535", "-format", "%[fx:w*h*mean]", "info:"] + args = [expectedfilename, resultfilename, "-alpha", "Off", "-compose", "difference", "-composite", "-threshold", "10%", "-gaussian-blur","3x65535", "-threshold", "99.99%", "-format", "%[fx:w*h*mean]", "info:"] # for systems where imagemagick crashes when using the above comparators - args = [expectedfilename, resultfilename, "-alpha", "Off", "-compose", "difference", "-metric", "NCC", "tmp.png"] - options.convert_exec = 'compare' - compare_method = 'NCC' + # args = [expectedfilename, resultfilename, "-alpha", "Off", "-compose", "difference", "-metric", "NCC", "tmp.png"] + # options.convert_exec = 'compare' + # compare_method = 'NCC' msg = 'ImageMagick image comparison: ' - msg += os.path.basename(options.convert_exec) + ' '.join(args) - msg += ' expected image: ' + expectedfilename + msg += os.path.basename(options.convert_exec) + ' ' + ' '.join(args) + msg += '\nexpected image: ' + expectedfilename + '\n' print >> sys.stderr, msg if not resultfilename: print >> sys.stderr, "Error: OpenSCAD did not generate an image to test" @@ -106,7 +106,7 @@ def compare_png(resultfilename): if pixelerr < 32: return True else: print >> sys.stderr, pixelerr, ' pixel errors' elif compare_method=='NCC': - thresh = 0.99 + thresh = 0.95 ncc_err = float(output.strip()) if ncc_err > thresh: return True else: print >> sys.stderr, ncc_err, ' Images differ: NCC comparison < ', thresh |