Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F61042540
test_word_deletion_path.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, May 4, 04:17
Size
1 KB
Mime Type
text/x-python
Expires
Mon, May 6, 04:17 (2 d)
Engine
blob
Format
Raw Data
Handle
17456888
Attached To
rNIETZSCHEPYTHON nietzsche-python
test_word_deletion_path.py
View Options
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
Log In to Comment