Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F91234935
test_line_continuation.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, Nov 9, 05:44
Size
952 B
Mime Type
text/x-python
Expires
Mon, Nov 11, 05:44 (2 d)
Engine
blob
Format
Raw Data
Handle
22226396
Attached To
rNIETZSCHEPYTHON nietzsche-python
test_line_continuation.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.line_continuation
import
LineContinuation
from
datatypes.editor_comment
import
EditorComment
from
datatypes.reference
import
Reference
class
TestLineContinuation
(
unittest
.
TestCase
):
def
test_attach
(
self
):
tree
=
ET
.
Element
(
'asdf'
)
comment
=
LineContinuation
.
create_cls
(
'1,3'
)
#comment = LineContinuation(reference)
comment
.
attach_object_to_tree
(
tree
)
commentB
=
EditorComment
.
create_cls_from_node
(
tree
.
xpath
(
EditorComment
.
XML_TAG
)[
0
])
self
.
assertEqual
(
type
(
commentB
),
LineContinuation
)
self
.
assertEqual
(
commentB
.
reference
.
first_line
,
comment
.
reference
.
first_line
)
def
test_semantic
(
self
):
pass
#print(LineContinuation.get_semantic_dictionary())
if
__name__
==
"__main__"
:
unittest
.
main
()
Event Timeline
Log In to Comment