From 6137c1584fb99aa57c598f2da12341052ceb5097 Mon Sep 17 00:00:00 2001 From: Christos Tsolakis Date: Tue, 12 Nov 2024 09:38:55 -0500 Subject: [PATCH] fch5: Add test with nested metadata --- tests/imageseries/test_formats.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/imageseries/test_formats.py b/tests/imageseries/test_formats.py index 977b6211..aa0ddc5a 100644 --- a/tests/imageseries/test_formats.py +++ b/tests/imageseries/test_formats.py @@ -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))