From 3f4448ffce768b11d4994ac00da2e2d3aa559445 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Fri, 23 Sep 2022 09:55:46 -0300 Subject: [PATCH] [Tests] More image tollerance --- tests/test_plot/test_pdf.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/test_plot/test_pdf.py b/tests/test_plot/test_pdf.py index 47d78262..edecb28b 100644 --- a/tests/test_plot/test_pdf.py +++ b/tests/test_plot/test_pdf.py @@ -7,6 +7,7 @@ pytest-3 --log-cli-level debug import os from . import context PS_DIR = 'PDF' +DIFF_TOL = 0 if os.path.isfile('/etc/debian_version') else 250 def test_pdf(test_dir): @@ -38,7 +39,7 @@ def test_pdf_refill_2(test_dir): ctx.run() b_cu = ctx.get_gerber_filename('B_Cu', '.pdf') ctx.expect_out_file(b_cu) - ctx.compare_image(b_cu) + ctx.compare_image(b_cu, tol=DIFF_TOL) assert os.path.isfile(bkp) finally: if os.path.isfile(bkp): @@ -52,8 +53,8 @@ def test_pdf_variant_1(test_dir): ctx.run() fname = prj+'-F_Fab.pdf' ctx.expect_out_file(fname) - ctx.compare_image(fname) + ctx.compare_image(fname, tol=DIFF_TOL) fname = prj+'-B_Fab.pdf' ctx.expect_out_file(fname) - ctx.compare_image(fname) + ctx.compare_image(fname, tol=DIFF_TOL) ctx.clean_up()