mirror of
https://github.com/mikegerber/ocrd_calamari.git
synced 2025-06-09 03:39:55 +02:00
✔ Fix tests to use the new filenames
OCR-D seems to create the files in the output file group with a new naming scheme (based on file group name and page id); Adjust the tests accordingly. It's probably not the best approach to expect certain filenames, and it would be better to use METS/the OCR-D API to ask for a certain page and it's file, but for now we use this.
This commit is contained in:
parent
1dcec06c2b
commit
2c54a265a6
1 changed files with 3 additions and 3 deletions
|
@ -97,7 +97,7 @@ def test_recognize(workspace):
|
||||||
).process()
|
).process()
|
||||||
workspace.save_mets()
|
workspace.save_mets()
|
||||||
|
|
||||||
page1 = os.path.join(workspace.directory, "OCR-D-OCR-CALAMARI/OCR-D-OCR-CALAMARI_0001.xml")
|
page1 = os.path.join(workspace.directory, "OCR-D-OCR-CALAMARI/OCR-D-OCR-CALAMARI_phys_0001.xml")
|
||||||
assert os.path.exists(page1)
|
assert os.path.exists(page1)
|
||||||
assertFileContains(page1, "verſchuldeten")
|
assertFileContains(page1, "verſchuldeten")
|
||||||
|
|
||||||
|
@ -127,7 +127,7 @@ def test_word_segmentation(workspace):
|
||||||
).process()
|
).process()
|
||||||
workspace.save_mets()
|
workspace.save_mets()
|
||||||
|
|
||||||
page1 = os.path.join(workspace.directory, "OCR-D-OCR-CALAMARI/OCR-D-OCR-CALAMARI_0001.xml")
|
page1 = os.path.join(workspace.directory, "OCR-D-OCR-CALAMARI/OCR-D-OCR-CALAMARI_phys_0001.xml")
|
||||||
assert os.path.exists(page1)
|
assert os.path.exists(page1)
|
||||||
tree = etree.parse(page1)
|
tree = etree.parse(page1)
|
||||||
nsmap = { "pc": page_namespace(tree) }
|
nsmap = { "pc": page_namespace(tree) }
|
||||||
|
@ -160,7 +160,7 @@ def test_glyphs(workspace):
|
||||||
).process()
|
).process()
|
||||||
workspace.save_mets()
|
workspace.save_mets()
|
||||||
|
|
||||||
page1 = os.path.join(workspace.directory, "OCR-D-OCR-CALAMARI/OCR-D-OCR-CALAMARI_0001.xml")
|
page1 = os.path.join(workspace.directory, "OCR-D-OCR-CALAMARI/OCR-D-OCR-CALAMARI_phys_0001.xml")
|
||||||
assert os.path.exists(page1)
|
assert os.path.exists(page1)
|
||||||
tree = etree.parse(page1)
|
tree = etree.parse(page1)
|
||||||
nsmap = { "pc": page_namespace(tree) }
|
nsmap = { "pc": page_namespace(tree) }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue