Page MenuHomec4science

test_reconstructed_konvolut.py
No OneTemporary

File Metadata

Created
Sat, Apr 27, 16:58

test_reconstructed_konvolut.py

import unittest
from os import sep, path
from os.path import basename, dirname, isfile
import lxml.etree as ET
import sys
sys.path.append('svgscripts')
from datatypes.reconstructed_konvolut import ReconstructedKonvolut, NonExistentPage
class TestReconstructedKonvolut(unittest.TestCase):
def setUp(self):
ReconstructedKonvolut.UNITTESTING = True
DATADIR = dirname(__file__) + sep + 'test_data'
self.test_manuscript = DATADIR + sep + 'N_VII_1.xml'
def test_get_semanticAndDataDict(self):
semantic_dict = ReconstructedKonvolut.get_semantic_dictionary()
#print(semantic_dict)
def test_create_cls(self):
manuscript = ReconstructedKonvolut.create_cls('xml/Rekonstruiertes_Quartheft_von_1886-87.xml')
self.assertTrue(manuscript.description is not None)
self.assertEqual(manuscript.manuscript_type, 'Arbeitsheft')
self.assertEqual(len(manuscript.pages), 13)
if __name__ == "__main__":
unittest.main()

Event Timeline