Skip to content

Commit

Permalink
Update test_workspace.py
Browse files Browse the repository at this point in the history
  • Loading branch information
bertsky authored May 3, 2021
1 parent 39a7e55 commit db79ff6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/test_workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,13 @@ def test_image_feature_selectoro(self):
ws = self.resolver.workspace_from_url('mets.xml')
with open('image_features.page.xml', 'r') as f:
pcgts = parseString(f.read().encode('utf8'), silence=True)
# richest feature set is not last:
img, info, exif = ws.image_from_page(pcgts.get_Page(), page_id='page1', feature_selector='dewarped')
self.assertEquals(info['features'], 'cropped,dewarped,binarized,despeckled,deskewed')
# recropped because foo4 contains cropped+deskewed but not recropped yet:
self.assertEquals(info['features'], 'cropped,dewarped,binarized,despeckled,deskewed,recropped')
# richest feature set is also last:
img, info, exif = ws.image_from_page(pcgts.get_Page(), page_id='page1', feature_selector='dewarped', feature_filter='binarized')
# no deskewing here, thus no recropping:
self.assertEquals(info['features'], 'cropped,dewarped,despeckled')

def test_downsample_16bit_image(self):
Expand Down

0 comments on commit db79ff6

Please sign in to comment.