Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
ebcc660c
Commit
ebcc660c
authored
Jul 14, 2017
by
Martin Reinecke
Browse files
test serialization of Fields
parent
5596655d
Pipeline
#14887
passed with stage
in 6 minutes and 9 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
test/test_serialization.py
View file @
ebcc660c
...
@@ -21,6 +21,7 @@ import unittest
...
@@ -21,6 +21,7 @@ import unittest
from
numpy.testing
import
assert_equal
from
numpy.testing
import
assert_equal
from
keepers
import
Repository
from
keepers
import
Repository
from
test.common
import
expand
,
generate_spaces
from
test.common
import
expand
,
generate_spaces
from
nifty
import
Field
from
nose.plugins.skip
import
SkipTest
from
nose.plugins.skip
import
SkipTest
import
os
import
os
...
@@ -33,6 +34,9 @@ class SpaceSerializationTests(unittest.TestCase):
...
@@ -33,6 +34,9 @@ class SpaceSerializationTests(unittest.TestCase):
raise
SkipTest
raise
SkipTest
repo
=
Repository
(
'test.h5'
)
repo
=
Repository
(
'test.h5'
)
repo
.
add
(
space
,
'space'
)
repo
.
add
(
space
,
'space'
)
field
=
Field
(
space
,
val
=
42.
)
repo
.
add
(
field
,
'field'
)
repo
.
commit
()
repo
.
commit
()
assert_equal
(
space
,
repo
.
get
(
'space'
))
assert_equal
(
space
,
repo
.
get
(
'space'
))
assert_equal
(
field
,
repo
.
get
(
'field'
))
os
.
remove
(
'test.h5'
)
os
.
remove
(
'test.h5'
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment