|
1 | 1 | from pathlib import Path |
2 | 2 |
|
3 | | -import pytest |
4 | 3 | from click.testing import CliRunner |
5 | 4 |
|
6 | 5 | from diffpdf.cli import cli |
@@ -35,31 +34,3 @@ def test_double_verbose_flag(): |
35 | 34 | ) |
36 | 35 | assert result.exit_code == 0 |
37 | 36 | assert "DEBUG" in result.output |
38 | | - |
39 | | - |
40 | | -@pytest.mark.parametrize( |
41 | | - "ref_pdf_rel,actual_pdf_rel,expected_exit_code", |
42 | | - [ |
43 | | - # Pass cases (exit code 0) |
44 | | - ("pass/identical-A.pdf", "pass/identical-B.pdf", 0), |
45 | | - ("pass/hash-diff-A.pdf", "pass/hash-diff-B.pdf", 0), |
46 | | - ("pass/minor-color-diff-A.pdf", "pass/minor-color-diff-B.pdf", 0), |
47 | | - ("pass/multiplatform-diff-A.pdf", "pass/multiplatform-diff-B.pdf", 0), |
48 | | - # Fail cases (exit code 1) |
49 | | - ("fail/1-letter-diff-A.pdf", "fail/1-letter-diff-B.pdf", 1), |
50 | | - ("fail/major-color-diff-A.pdf", "fail/major-color-diff-B.pdf", 1), |
51 | | - ("fail/page-count-diff-A.pdf", "fail/page-count-diff-B.pdf", 1), |
52 | | - # Critical error cases (exit code 2) |
53 | | - ("nonexistent.pdf", "another.pdf", 2), |
54 | | - ], |
55 | | -) |
56 | | -def test_comparators(ref_pdf_rel, actual_pdf_rel, expected_exit_code): |
57 | | - """Parametric integration test: CLI should exit with correct code for various PDF pairs.""" |
58 | | - runner = CliRunner() |
59 | | - |
60 | | - ref_pdf = str(TEST_ASSETS_DIR / ref_pdf_rel) |
61 | | - actual_pdf = str(TEST_ASSETS_DIR / actual_pdf_rel) |
62 | | - |
63 | | - result = runner.invoke(cli, [ref_pdf, actual_pdf]) |
64 | | - |
65 | | - assert result.exit_code == expected_exit_code |
0 commit comments