Skip to content

Commit

Permalink
STY: Modify error messages.
Browse files Browse the repository at this point in the history
Also some documentation tweaks in PdfWriter
  • Loading branch information
j-t-1 authored Oct 14, 2024
1 parent 8c51d94 commit 7cb7e78
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1187,21 +1187,21 @@ def test_set_page_label(pdf_file_path):
writer = PdfWriter()
writer.clone_document_from_reader(reader)
with pytest.raises(
ValueError, match="at least one between style and prefix must be given"
ValueError, match="at least one of style and prefix must be given"
):
writer.set_page_label(0, 5, start=2)
with pytest.raises(
ValueError, match="page_index_from must be equal or greater then 0"
ValueError, match="page_index_from must be greater or equal than 0"
):
writer.set_page_label(-1, 5, "/r")
with pytest.raises(
ValueError, match="page_index_to must be equal or greater then page_index_from"
ValueError, match="page_index_to must be greater or equal than page_index_from"
):
writer.set_page_label(5, 0, "/r")
with pytest.raises(ValueError, match="page_index_to exceeds number of pages"):
writer.set_page_label(0, 19, "/r")
with pytest.raises(
ValueError, match="if given, start must be equal or greater than one"
ValueError, match="if given, start must be greater or equal than one"
):
writer.set_page_label(0, 5, "/r", start=-1)

Expand Down

0 comments on commit 7cb7e78

Please sign in to comment.