File: test_margins.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 (14 lines) | stat: -rw-r--r-- 374 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from pathlib import Path

from fpdf import FPDF
from test.conftest import assert_pdf_equal

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


def test_set_no_margin(tmp_path):
    pdf = FPDF()
    pdf.add_page()
    pdf.set_margin(0)
    pdf.image(HERE / "../image/image_types/insert_images_insert_png.png", w=pdf.epw)
    assert_pdf_equal(pdf, HERE / "set_no_margin.pdf", tmp_path)