Skip to content

Commit 11f843e

Browse files
tests/test_story.py: test_story(): update to work with latest mupdf.
Latest mupdf master has footer spacing so we need to give more space otherwise there will be spurious page breaks.
1 parent c25cada commit 11f843e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/test_story.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def test_story():
3838
def test_2753():
3939

4040
def rectfn(rect_num, filled):
41-
return pymupdf.Rect(0, 0, 200, 200), pymupdf.Rect(50, 50, 100, 100), None
41+
return pymupdf.Rect(0, 0, 200, 200), pymupdf.Rect(50, 50, 100, 150), None
4242

4343
def make_pdf(html, path_out):
4444
story = pymupdf.Story(html=html)
@@ -65,6 +65,9 @@ def make_pdf(html, path_out):
6565
os.path.abspath(f'{__file__}/../../tests/test_2753-out-after.pdf'),
6666
)
6767

68+
path = os.path.normpath(f'{__file__}/../../tests/test_2753_out')
69+
doc_before.save(f'{path}_before.pdf')
70+
doc_after.save(f'{path}_after.pdf')
6871
assert len(doc_before) == 2
6972
assert len(doc_after) == 2
7073

0 commit comments

Comments
 (0)