File: test_pdfnup.py

package info (click to toggle)
psutils 3.3.14-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,280 kB
  • sloc: python: 2,984; makefile: 28
file content (45 lines) | stat: -rw-r--r-- 907 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
"""pdfnup tests.

Copyright (c) Reuben Thomas 2023-2025.
Released under the GPL version 3, or (at your option) any later version.
"""

from collections.abc import Callable
from pathlib import Path

from pytest import CaptureFixture
from testutils import Case, file_test, make_tests

from psutils.command.psnup import psnup


pytestmark = make_tests(
    psnup,
    Path(__file__).parent.resolve() / "test-files",
    Case(
        "recursive-links",
        ["-2"],
        "recursive-links",
    ),
)


def test_pdfnup(
    function: Callable[[list[str]], None],
    case: Case,
    fixture_dir: Path,
    capsys: CaptureFixture[str],
    datafiles: Path,
    regenerate_input: bool,
    regenerate_expected: bool,
) -> None:
    file_test(
        function,
        case,
        fixture_dir,
        capsys,
        datafiles,
        ".pdf",
        regenerate_input,
        regenerate_expected,
    )