Skip to content

Commit

Permalink
reenable test for #37
Browse files Browse the repository at this point in the history
  • Loading branch information
hnesk committed May 15, 2022
1 parent 00203a5 commit c383a50
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/model/test_document.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,3 +179,12 @@ def test_path_with_spaces(self):
image = doc.workspace.image_from_page(page.page, 'PHYS_0017')
# Assert no exceptions happened and a sensible return value
self.assertGreater(image[0].height, 100)

def test_missing_image(self):
path = TEST_BASE_PATH / 'example/workspaces/kant_aufklaerung_1784_missing_image/mets.xml'
uri = path.as_uri()
doc = Document.load(uri)
page = doc.page_for_id('PHYS_0017', 'OCR-D-GT-PAGE')
image, info, exif = page.get_image(feature_selector='', feature_filter='binarized')
# Assert no exceptions happened and no image returned
self.assertIsNone(image)

0 comments on commit c383a50

Please sign in to comment.