Skip to content

Commit

Permalink
Add page
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinThoma committed May 19, 2022
1 parent 27cf3e7 commit cadbf07
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/test_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)

0 comments on commit cadbf07

Please sign in to comment.