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