Skip to content

Commit

Permalink
Test if line 1474 is now covered
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinThoma committed Jul 2, 2023
1 parent 1c0ef3c commit d882308
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pypdf/generic/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ def clone(
Returns:
The cloned PdfObject
"""
raise Exception("clone PdfObject")
raise NotImplementedError(
f"{self.__class__.__name__} does not implement .clone so far"
)

def _reference_clone(
self, clone: Any, pdf_dest: PdfWriterProtocol, force_duplicate: bool = False
Expand Down
4 changes: 4 additions & 0 deletions tests/test_generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1170,6 +1170,10 @@ def test_destination_withoutzoom():
reader = PdfReader(BytesIO(get_pdf_from_url(url, name=name)))
reader.outline

out = BytesIO()
writer = PdfWriter(clone_from=reader)
writer.write(out)


def test_encodedstream_set_data():
"""
Expand Down

0 comments on commit d882308

Please sign in to comment.