Compare commits
4 commits
d6d0a6ea06
...
8d00b730f1
Author | SHA1 | Date | |
---|---|---|---|
|
8d00b730f1 | ||
c50b44a3a0 | |||
9bf02315aa | |||
5000545f0d |
1 changed files with 4 additions and 4 deletions
|
@ -149,8 +149,8 @@ def test_cases(postersize, input_pagesize, output_pagesize, strategy, expected):
|
|||
height = mm_to_pt(input_pagesize[1])
|
||||
|
||||
doc = fitz.open()
|
||||
page = doc.new_page(pno=-1, width=width, height=height)
|
||||
img = page.new_shape()
|
||||
page = doc.newPage(pno=-1, width=width, height=height)
|
||||
img = page.newShape()
|
||||
|
||||
red = fitz.utils.getColor("red")
|
||||
green = fitz.utils.getColor("green")
|
||||
|
@ -189,7 +189,7 @@ def test_cases(postersize, input_pagesize, output_pagesize, strategy, expected):
|
|||
|
||||
doc = fitz.open(outfile)
|
||||
|
||||
for pnum, (bbox, matrix) in zip(range(doc.page_count), expected):
|
||||
for pnum, (bbox, matrix) in zip(range(doc.pageCount), expected):
|
||||
xreflist = doc._getPageInfo(pnum, 3)
|
||||
assert len(xreflist) >= 1
|
||||
xref, name, _, _ = xreflist[0]
|
||||
|
@ -209,7 +209,7 @@ def test_cases(postersize, input_pagesize, output_pagesize, strategy, expected):
|
|||
# >>
|
||||
keyvals = dict(
|
||||
tuple(line.strip().split(maxsplit=1))
|
||||
for line in doc.xref_object(xref).splitlines()
|
||||
for line in doc.xrefObject(xref).splitlines()
|
||||
if " " in line.strip()
|
||||
)
|
||||
assert "/BBox" in keyvals
|
||||
|
|
Loading…
Reference in a new issue