Checking alternate root access to the object tree.
(self)
| 249 | ) |
| 250 | |
| 251 | def test04b_alternateRootFile(self): |
| 252 | """Checking alternate root access to the object tree.""" |
| 253 | |
| 254 | # Open the existent HDF5 file |
| 255 | self._reopen( |
| 256 | root_uep="/agroup", node_cache_slots=self.node_cache_slots |
| 257 | ) |
| 258 | |
| 259 | # Get the CLASS attribute of the arr object |
| 260 | if common.verbose: |
| 261 | print("\nFile tree dump:", self.h5file) |
| 262 | title = self.h5file.root.anarray1.get_attr("TITLE") |
| 263 | |
| 264 | # Get the node again, as this can trigger errors in some situations |
| 265 | anarray1 = self.h5file.root.anarray1 |
| 266 | self.assertIsNotNone(anarray1) |
| 267 | |
| 268 | self.assertEqual(title, "Array title 1") |
| 269 | |
| 270 | # This test works well, but HDF5 emits a series of messages that |
| 271 | # may lose the user. It is better to deactivate it. |