Page MenuHomec4science

test_word_deletion_path.py
No OneTemporary

File Metadata

Created
Sat, May 4, 04:17

test_word_deletion_path.py

import unittest
from os import sep, path
from os.path import isdir, dirname, basename
import lxml.etree as ET
from svgpathtools.parser import parse_path
from svgpathtools.path import Line
from svgpathtools.path import Path as SVGPath
import sys
import sys
sys.path.append('svgscripts')
from datatypes.page import Page
from datatypes.word_deletion_path import WordDeletionPath
from datatypes.transkription_position import TranskriptionPosition
from datatypes.positional_word_part import PositionalWordPart
class TestPath(unittest.TestCase):
def setUp(self):
DATADIR = path.dirname(__file__) + sep + 'test_data'
self.xml_file = DATADIR + sep + 'N_VII_1_page138.xml'
def test_init(self):
page = Page(self.xml_file)
node = page.page_tree.xpath(WordDeletionPath.XML_TAG)[0]
path = WordDeletionPath.create_cls(page, node=node)
d_attribute = 'M 48.19,60.125 L 71.41,60.125 L 71.41,60.625 L 48.19,60.625 L 48.19,60.125'
path = WordDeletionPath.create_cls(page, d_attribute=d_attribute)
#print(path)
def test_get_semantic_dict(self):
#print(WordDeletionPath.get_semantic_dictionary())
pass
if __name__ == "__main__":
unittest.main()

Event Timeline