Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F63198195
test_py2ttl_data.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 18, 10:13
Size
1 KB
Mime Type
text/x-python
Expires
Mon, May 20, 10:13 (2 d)
Engine
blob
Format
Raw Data
Handle
17744014
Attached To
rNIETZSCHEPYTHON nietzsche-python
test_py2ttl_data.py
View Options
import
unittest
import
lxml.etree
as
ET
from
os
import
sep
,
path
,
remove
from
os.path
import
isfile
,
dirname
from
rdflib
import
Graph
,
URIRef
,
Literal
import
sys
sys
.
path
.
append
(
'py2ttl'
)
import
py2ttl_data
from
py2ttl_data
import
Py2TTLDataConverter
from
config
import
PROJECT_NAME
,
PROJECT_ONTOLOGY_FILE
from
knora_base
import
KNORA_BASE
if
dirname
(
dirname
(
__file__
))
not
in
sys
.
path
:
sys
.
path
.
append
(
dirname
(
dirname
(
__file__
)))
from
svgscripts.datatypes.word
import
Word
from
svgscripts.datatypes.word_position
import
WordPosition
class
TestPy2TTL
(
unittest
.
TestCase
):
"""This is the unittest for py2ttl.py2ttl.
@label unittest
"""
def
setUp
(
self
):
DATADIR
=
dirname
(
__file__
)
+
sep
+
'test_data'
self
.
manuscript_file
=
DATADIR
+
sep
+
'N_VII_1.xml'
self
.
ttl_target
=
__file__
+
'test.ttl'
def
test_main
(
self
):
Py2TTLDataConverter
.
UNITTESTING
=
True
argv
=
[
self
.
manuscript_file
]
self
.
assertEqual
(
py2ttl_data
.
main
(
argv
),
0
)
def
tearDown
(
self
):
isfile
(
self
.
ttl_target
)
and
remove
(
self
.
ttl_target
)
if
__name__
==
"__main__"
:
unittest
.
main
()
Event Timeline
Log In to Comment