Page MenuHomec4science

test_clarification.py
No OneTemporary

File Metadata

Created
Sat, Apr 27, 19:29

test_clarification.py

import unittest
from os import sep, path
from os.path import dirname, basename, isfile, isdir
import lxml.etree as ET
import sys
sys.path.append('svgscripts')
from datatypes.clarification import Clarification
from datatypes.editor_comment import EditorComment
from datatypes.text import Text
class TestClarification(unittest.TestCase):
def test_attach(self):
text = Text(content='text')
comment = Clarification(text=text)
tree = ET.Element('asdf')
comment.attach_object_to_tree(tree)
commentB = EditorComment.create_cls_from_node(tree.xpath(EditorComment.XML_TAG)[0])
self.assertEqual(type(commentB), Clarification)
self.assertEqual(commentB.text.content, comment.text.content)
def test_semantic(self):
pass
#print(Clarification.get_semantic_dictionary())
if __name__ == "__main__":
unittest.main()

Event Timeline