Skip to content

Commit

Permalink
fch5: Add test with nested metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristosT committed Nov 12, 2024
1 parent a4968ce commit 6137c15
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/imageseries/test_formats.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,3 +137,14 @@ def setUp(self):
self.thresh = 0.5
self.cache_file = 'frame-cache.fch5'
_, self.is_a = make_array_ims()

def test_fmtfc_nested_metadata(self):
"""frame-cache format with nested metadata"""
metadata = {'int': 1, 'array': np.array([1, 2, 3])}
self.is_a.metadata["key"] = metadata

imageseries.write(self.is_a, self.fcfile, self.fmt, style=self.style,
threshold=self.thresh, cache_file=self.cache_file
)
is_fc = imageseries.open(self.fcfile, self.fmt, style=self.style)
self.assertTrue(compare_meta(self.is_a, is_fc))

0 comments on commit 6137c15

Please sign in to comment.