mirror of
https://github.com/qurator-spk/eynollah.git
synced 2025-11-10 06:34:11 +01:00
add layout marginalia test
This commit is contained in:
parent
d224b0f7e8
commit
44037bc05d
4 changed files with 259 additions and 0 deletions
|
|
@ -103,3 +103,26 @@ def test_run_eynollah_layout_directory(
|
|||
]
|
||||
)
|
||||
assert len(list(outdir.iterdir())) == 2
|
||||
|
||||
def test_run_eynollah_layout_marginalia(
|
||||
tmp_path,
|
||||
resources_dir,
|
||||
run_eynollah_ok_and_check_logs,
|
||||
):
|
||||
outdir = tmp_path
|
||||
outfile = outdir / 'estor_rechtsgelehrsamkeit02_1758_0880_800px.xml'
|
||||
run_eynollah_ok_and_check_logs(
|
||||
'layout',
|
||||
[
|
||||
'-i', str(resources_dir / 'estor_rechtsgelehrsamkeit02_1758_0880_800px.jpg'),
|
||||
'-o', str(outdir),
|
||||
],
|
||||
[
|
||||
'Job done in',
|
||||
'All jobs done in',
|
||||
]
|
||||
)
|
||||
assert outfile.exists()
|
||||
tree = page_from_file(str(outfile)).etree
|
||||
regions = tree.xpath('//page:TextRegion[type="marginalia"]', namespaces=NS)
|
||||
assert len(regions) == 5, "expected 5 marginalia regions"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue