Skip to content

Commit

Permalink
Finally correcting the test script
Browse files Browse the repository at this point in the history
  • Loading branch information
JorjMcKie committed Oct 5, 2023
1 parent 52eabda commit 39e4c3e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
12 changes: 0 additions & 12 deletions tests/test_2635.py

This file was deleted.

11 changes: 11 additions & 0 deletions tests/test_general.py
Original file line number Diff line number Diff line change
Expand Up @@ -553,3 +553,14 @@ def test_2596():
page = doc.reload_page(page)
pix1 = page.get_pixmap()
assert pix1.samples == pix0.samples


def test_2635():
"""Rendering a page before and after cleaning it should yield the same pixmap."""
doc = fitz.open(f"{scriptdir}/resources/test_2635.pdf")
page = doc[0]
pix1 = page.get_pixmap() # pixmap before cleaning

page.clean_contents() # clean page
pix2 = page.get_pixmap() # pixmap after cleaning
assert pix1.samples == pix2.samples # assert equality

0 comments on commit 39e4c3e

Please sign in to comment.