From cadbf071c58024fbc6433a2ef39db737a3f8bc4f Mon Sep 17 00:00:00 2001 From: Martin Thoma Date: Thu, 19 May 2022 18:51:13 +0200 Subject: [PATCH] Add page --- tests/test_page.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/test_page.py b/tests/test_page.py index 780a45e7e..e23b2598f 100644 --- a/tests/test_page.py +++ b/tests/test_page.py @@ -3,7 +3,7 @@ import pytest -from PyPDF2 import PdfFileReader +from PyPDF2 import PdfFileReader, Transformation from PyPDF2._page import PageObject from PyPDF2.generic import RectangleObject @@ -128,3 +128,11 @@ def test_page_rotation_non90(): with pytest.raises(ValueError) as exc: page.rotateClockwise(91) assert exc.value.args[0] == "Rotation angle must be a multiple of 90" + + +def test_page_scale(): + op = Transformation() + with pytest.raises(ValueError) as exc: + op.scale() + + assert op.scale(sx=2).ctm == (2, 0, 0, 2, 0, 0)