Skip to content

Commit 6137c15

Browse files
committed
fch5: Add test with nested metadata
1 parent a4968ce commit 6137c15

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/imageseries/test_formats.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,3 +137,14 @@ def setUp(self):
137137
self.thresh = 0.5
138138
self.cache_file = 'frame-cache.fch5'
139139
_, self.is_a = make_array_ims()
140+
141+
def test_fmtfc_nested_metadata(self):
142+
"""frame-cache format with nested metadata"""
143+
metadata = {'int': 1, 'array': np.array([1, 2, 3])}
144+
self.is_a.metadata["key"] = metadata
145+
146+
imageseries.write(self.is_a, self.fcfile, self.fmt, style=self.style,
147+
threshold=self.thresh, cache_file=self.cache_file
148+
)
149+
is_fc = imageseries.open(self.fcfile, self.fmt, style=self.style)
150+
self.assertTrue(compare_meta(self.is_a, is_fc))

0 commit comments

Comments
 (0)