Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F80566831
test_editor_correction.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
Sun, Sep 1, 10:24
Size
945 B
Mime Type
text/x-python
Expires
Tue, Sep 3, 10:24 (2 d)
Engine
blob
Format
Raw Data
Handle
20396165
Attached To
rNIETZSCHEPYTHON nietzsche-python
test_editor_correction.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.page
import
Page
from
datatypes.editor_comment
import
EditorComment
from
datatypes.editor_correction
import
EditorCorrection
class
TestEditorCorrection
(
unittest
.
TestCase
):
def
test_attach
(
self
):
comment
=
EditorCorrection
(
'test'
)
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
),
EditorCorrection
)
self
.
assertEqual
(
commentB
.
is_uncertain
,
comment
.
is_uncertain
)
self
.
assertEqual
(
commentB
.
correction_text
,
comment
.
correction_text
)
def
test_semantic
(
self
):
pass
#print(EditorCorrection.get_semantic_dictionary())
if
__name__
==
"__main__"
:
unittest
.
main
()
Event Timeline
Log In to Comment