Skip to content

Commit

Permalink
update bookmark test
Browse files Browse the repository at this point in the history
  • Loading branch information
mara004 committed May 16, 2022
1 parent 1183acb commit 92ff911
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/helpers/test_toc.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@
from ..conftest import TestFiles


def _compare_bookmark(bookmark, title, page_index, view_mode, view_pos):
def _compare_bookmark(bookmark, title, page_index, view_mode, view_pos, is_closed):
assert bookmark.title == title
assert bookmark.page_index == page_index
assert bookmark.view_mode == view_mode
approx(bookmark.view_pos) == view_pos
assert approx(bookmark.view_pos, rel=0.01) == view_pos
assert bookmark.is_closed == is_closed


def test_gettoc():
Expand All @@ -27,6 +28,7 @@ def test_gettoc():
page_index = 0,
view_mode = pdfium.ViewMode.XYZ,
view_pos = (89, 758, 0),
is_closed = True,
)

# check common values
Expand All @@ -42,6 +44,7 @@ def test_gettoc():
page_index = 1,
view_mode = pdfium.ViewMode.XYZ,
view_pos = (89, 657, 0),
is_closed = False
)

doc.close()
Expand Down

0 comments on commit 92ff911

Please sign in to comment.