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

Method test01a_copyDeepTree

tables/tests/test_tree.py:759–777  ·  view source on GitHub ↗

Copy of a large depth object tree.

(self)

Source from the content-addressed store, hash-verified

757 self._check_tree(self.h5fname)
758
759 def test01a_copyDeepTree(self):
760 """Copy of a large depth object tree."""
761
762 self.h5file = tb.open_file(self.h5fname, mode="r")
763 h5fname2 = tempfile.mktemp(".h5")
764 try:
765 with tb.open_file(h5fname2, mode="w") as h5file2:
766 if common.verbose:
767 print("\nCopying deep tree...")
768
769 self.h5file.copy_node(
770 self.h5file.root, h5file2.root, recursive=True
771 )
772 self.h5file.close()
773
774 self._check_tree(h5fname2)
775 finally:
776 if Path(h5fname2).is_file():
777 Path(h5fname2).unlink()
778
779 def test01b_copyDeepTree(self):
780 """Copy of a large depth object tree with small node cache."""

Callers

nothing calls this directly

Calls 3

_check_treeMethod · 0.95
copy_nodeMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected