(self, filename)
| 728 | self.h5file.close() |
| 729 | |
| 730 | def _check_tree(self, filename): |
| 731 | # Open the previous HDF5 file in read-only mode |
| 732 | |
| 733 | with tb.open_file(filename, mode="r") as h5file: |
| 734 | group = h5file.root |
| 735 | if common.verbose: |
| 736 | print("\nDepth reading progress: ", end=" ") |
| 737 | |
| 738 | # Get the metadata on the previosly saved arrays |
| 739 | for depth in range(self.maxdepth): |
| 740 | if common.verbose: |
| 741 | print("%3d," % (depth), end=" ") |
| 742 | |
| 743 | # Check the contents |
| 744 | self.assertEqual(group.array[:], [1, 1]) |
| 745 | self.assertIn("array2", group) |
| 746 | self.assertIn("group2_" + str(depth), group) |
| 747 | |
| 748 | # Iterate over the next group |
| 749 | group = h5file.get_node(group, "group" + str(depth)) |
| 750 | |
| 751 | if common.verbose: |
| 752 | print() # This flush the stdout buffer |
| 753 | |
| 754 | def test00_deepTree(self): |
| 755 | """Creation of a large depth object tree.""" |
no test coverage detected