Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F60140290
test_clarification.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Apr 27, 19:29
Size
889 B
Mime Type
text/x-python
Expires
Mon, Apr 29, 19:29 (2 d)
Engine
blob
Format
Raw Data
Handle
17307466
Attached To
rNIETZSCHEPYTHON nietzsche-python
test_clarification.py
View Options
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
Log In to Comment