Skip to content

Commit

Permalink
tests/test_toc.py
Browse files Browse the repository at this point in the history
  • Loading branch information
julian-smith-artifex-com committed Mar 26, 2024
1 parent a3163f9 commit 17d8a7d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/test_toc.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,17 @@ def test_full_toc():
expected = pathlib.Path(expected_path).read_bytes()
# Github windows x32 seems to insert \r characters; maybe something to
# do with the Python installation's line endings settings.
expected = expected.decode("utf8")
expected = expected.replace('\r', '')
print(f'expected is:\n{expected!r}')
toc = "\n".join([str(t) for t in doc.get_toc(False)])
toc += "\n"
#print(f'toc is:\n{toc!r}')
print(f'toc is:\n{toc!r}')
#expected2 = expected.decode("utf8")
#print(f'expected2 is:\n{expected2!r}')
#
#print(f'toc encoded is:\n{toc.encode("utf8")!r}')
#print(f'expected is:\n{expected!r}')
assert toc == expected.decode("utf8")
assert toc == expected


def test_erase_toc():
Expand Down

0 comments on commit 17d8a7d

Please sign in to comment.