Checking appending objects to an existing file.
(self)
| 186 | self.assertEqual(title, "Array example") |
| 187 | |
| 188 | def test02_appendFile(self): |
| 189 | """Checking appending objects to an existing file.""" |
| 190 | |
| 191 | # Append a new array to the existing file |
| 192 | self._reopen(mode="r+", node_cache_slots=self.node_cache_slots) |
| 193 | self.h5file.create_array( |
| 194 | self.h5file.root, "array2", [3, 4], title="Title example 2" |
| 195 | ) |
| 196 | |
| 197 | # Open this file in read-only mode |
| 198 | self._reopen(node_cache_slots=self.node_cache_slots) |
| 199 | |
| 200 | # Get the CLASS attribute of the arr object |
| 201 | title = self.h5file.root.array2.get_attr("TITLE") |
| 202 | |
| 203 | self.assertEqual(title, "Title example 2") |
| 204 | |
| 205 | def test02b_appendFile2(self): |
| 206 | """Checking appending objects to an existing file ("a" version)""" |
nothing calls this directly
no test coverage detected