Skip to content

Commit

Permalink
test_ocrd_mets: test new pageId regex
Browse files Browse the repository at this point in the history
  • Loading branch information
kba committed May 13, 2022
1 parent 1044383 commit 7604abb
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions tests/model/test_ocrd_mets.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,7 @@ def test_find_all_files(sbb_sample_01):
assert len(sbb_sample_01.find_all_files(mimetype=MIMETYPE_PAGE)) == 20, '20 ' + MIMETYPE_PAGE
assert len(sbb_sample_01.find_all_files(url='OCR-D-IMG/FILE_0005_IMAGE.tif')) == 1, '1 xlink:href="OCR-D-IMG/FILE_0005_IMAGE.tif"'
assert len(sbb_sample_01.find_all_files(pageId='PHYS_0001..PHYS_0005')) == 35, '35 files for page "PHYS_0001..PHYS_0005"'


def test_find_all_files_no_regex_for_pageid(sbb_sample_01):
with pytest.raises(Exception) as exc_obj:
sbb_sample_01.find_all_files(pageId='//foo')

assert "not support regex search for pageId" in str(exc_obj.value)
assert len(sbb_sample_01.find_all_files(pageId='//PHYS_000(1|2)')) == 34, '34 files in PHYS_001 and PHYS_0002'


def test_find_all_files_local_only(sbb_sample_01):
Expand Down

0 comments on commit 7604abb

Please sign in to comment.