eynollah/tests/test_xml.py

11 lines
357 B
Python
Raw Normal View History

from eynollah.utils.xml import create_page_xml
2021-04-12 13:25:29 +02:00
from ocrd_models.ocrd_page import to_xml
2021-04-12 13:25:29 +02:00
PAGE_2019 = 'http://schema.primaresearch.org/PAGE/gts/pagecontent/2019-07-15'
def test_create_xml():
2021-04-12 13:25:29 +02:00
pcgts = create_page_xml('/path/to/img.tif', 100, 100)
xmlstr = to_xml(pcgts)
assert 'xmlns:pc="%s"' % PAGE_2019 in xmlstr
assert 'Metadata' in xmlstr