|
31 | 31 |
|
32 | 32 | SKIP_IF_NO_LATEXMK = not which("latexmk") |
33 | 33 | REASON_NO_LATEXMK = "The command latexmk is not available." |
| 34 | +# Newer Sphinx/TeX stacks slightly shift pagination while keeping the report content intact. |
| 35 | +LATEXPDF_DIFF_THRESHOLD = 15 |
34 | 36 |
|
35 | 37 |
|
36 | 38 | @pytest.fixture |
@@ -2107,7 +2109,9 @@ def test_latexpdf( |
2107 | 2109 | assert (root / "TestWorkflow" / "report.csv").exists() |
2108 | 2110 | assert (root / "report_TestWorkflow.pdf").exists() |
2109 | 2111 | assert pdfdiff( |
2110 | | - root / "report_TestWorkflow.pdf", data_dir / "test_report" / "report_latexpdf.pdf" |
| 2112 | + root / "report_TestWorkflow.pdf", |
| 2113 | + data_dir / "test_report" / "report_latexpdf.pdf", |
| 2114 | + threshold=LATEXPDF_DIFF_THRESHOLD, |
2111 | 2115 | ) |
2112 | 2116 |
|
2113 | 2117 | def test_fail_element_no_exception( |
@@ -2443,7 +2447,7 @@ def test_latexpdf(self, tmpdir, dataset_df_path, data_dir, TestWorkflow): |
2443 | 2447 | assert pdfdiff( |
2444 | 2448 | root / "TestWorkflow_specifications.pdf", |
2445 | 2449 | data_dir / "test_report_before_run" / "report_latexpdf.pdf", |
2446 | | - threshold=15, |
| 2450 | + threshold=LATEXPDF_DIFF_THRESHOLD, |
2447 | 2451 | ) |
2448 | 2452 |
|
2449 | 2453 | @pytest.fixture |
@@ -2502,6 +2506,7 @@ def test_latexpdf_with_config( |
2502 | 2506 | assert pdfdiff( |
2503 | 2507 | root / "TestWorkflow_specifications.pdf", |
2504 | 2508 | data_dir / "test_report_before_run" / "report_latexpdf_with_config.pdf", |
| 2509 | + threshold=LATEXPDF_DIFF_THRESHOLD, |
2505 | 2510 | ) |
2506 | 2511 |
|
2507 | 2512 | def test_nested_workflows( |
|
0 commit comments