Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F60125066
test_reconstructed_konvolut.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, 16:58
Size
1004 B
Mime Type
text/x-python
Expires
Mon, Apr 29, 16:58 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
17263848
Attached To
rNIETZSCHEPYTHON nietzsche-python
test_reconstructed_konvolut.py
View Options
import
unittest
from
os
import
sep
,
path
from
os.path
import
basename
,
dirname
,
isfile
import
lxml.etree
as
ET
import
sys
sys
.
path
.
append
(
'svgscripts'
)
from
datatypes.reconstructed_konvolut
import
ReconstructedKonvolut
,
NonExistentPage
class
TestReconstructedKonvolut
(
unittest
.
TestCase
):
def
setUp
(
self
):
ReconstructedKonvolut
.
UNITTESTING
=
True
DATADIR
=
dirname
(
__file__
)
+
sep
+
'test_data'
self
.
test_manuscript
=
DATADIR
+
sep
+
'N_VII_1.xml'
def
test_get_semanticAndDataDict
(
self
):
semantic_dict
=
ReconstructedKonvolut
.
get_semantic_dictionary
()
#print(semantic_dict)
def
test_create_cls
(
self
):
manuscript
=
ReconstructedKonvolut
.
create_cls
(
'xml/Rekonstruiertes_Quartheft_von_1886-87.xml'
)
self
.
assertTrue
(
manuscript
.
description
is
not
None
)
self
.
assertEqual
(
manuscript
.
manuscript_type
,
'Arbeitsheft'
)
self
.
assertEqual
(
len
(
manuscript
.
pages
),
13
)
if
__name__
==
"__main__"
:
unittest
.
main
()
Event Timeline
Log In to Comment