File: test_linearization.py

package info (click to toggle)
fpdf2 2.8.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 53,860 kB
  • sloc: python: 39,487; sh: 133; makefile: 12
file content (20 lines) | stat: -rw-r--r-- 514 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from pathlib import Path

import pytest

from fpdf import FPDF
from test.conftest import assert_pdf_equal

HERE = Path(__file__).resolve().parent


@pytest.mark.xfail(
    reason="Implementation not finished, cf. https://github.com/py-pdf/fpdf2/issues/62"
)
def test_linearization(tmp_path):
    pdf = FPDF()
    pdf.add_page()
    pdf.image(
        HERE / "image/png_images/66ac49ef3f48ac9482049e1ab57a53e9.png", x=150, y=150
    )
    assert_pdf_equal(pdf, HERE / "linearization.pdf", tmp_path, linearize=True)