MCPcopy Create free account
hub / github.com/PyTables/PyTables / _check_tree

Method _check_tree

tables/tests/test_tree.py:730–752  ·  view source on GitHub ↗
(self, filename)

Source from the content-addressed store, hash-verified

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."""

Callers 5

test00_deepTreeMethod · 0.95
test01a_copyDeepTreeMethod · 0.95
test01b_copyDeepTreeMethod · 0.95
test01c_copyDeepTreeMethod · 0.95
test01d_copyDeepTreeMethod · 0.95

Calls 1

get_nodeMethod · 0.45

Tested by

no test coverage detected