Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F97876892
ut_isi.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
Tue, Jan 7, 02:09
Size
868 B
Mime Type
text/x-python
Expires
Thu, Jan 9, 02:09 (2 d)
Engine
blob
Format
Raw Data
Handle
23425774
Attached To
R3596 pybliographer
ut_isi.py
View Options
# -*- coding: latin-1 -*-
import
os
,
pybut
,
sys
,
re
from
Pyblio.Parsers.Semantic
import
ISI
from
Pyblio
import
Store
,
Schema
,
Registry
,
init_logging
class
TestISI
(
pybut
.
TestCase
):
def
setUp
(
self
):
Registry
.
load_default_settings
()
def
tearDown
(
self
):
Registry
.
reset
()
def
parse
(
self
,
file
):
schema
=
Registry
.
getSchema
(
"org.pybliographer/wok/0.1"
)
fd
=
open
(
file
)
self
.
fn
=
pybut
.
dbname
()
self
.
db
=
Store
.
get
(
'file'
)
.
dbcreate
(
self
.
fn
,
schema
)
self
.
p
=
ISI
.
Reader
()
self
.
p
.
parse
(
fd
,
self
.
db
)
return
def
testText
(
self
):
self
.
parse
(
pybut
.
src
(
'ut_isi/text.isi'
))
self
.
db
.
save
()
pybut
.
fileeq
(
self
.
fn
,
pybut
.
src
(
'ut_isi/text.xml'
))
return
suite
=
pybut
.
suite
(
TestISI
)
if
__name__
==
'__main__'
:
pybut
.
run
(
suite
)
Event Timeline
Log In to Comment