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

Method test01b_copyDeepTree

tables/tests/test_tree.py:779–799  ·  view source on GitHub ↗

Copy of a large depth object tree with small node cache.

(self)

Source from the content-addressed store, hash-verified

777 Path(h5fname2).unlink()
778
779 def test01b_copyDeepTree(self):
780 """Copy of a large depth object tree with small node cache."""
781
782 self.h5file = tb.open_file(self.h5fname, mode="r", node_cache_slots=10)
783 h5fname2 = tempfile.mktemp(".h5")
784 try:
785 with tb.open_file(
786 h5fname2, mode="w", node_cache_slots=10
787 ) as h5file2:
788 if common.verbose:
789 print("\nCopying deep tree...")
790
791 self.h5file.copy_node(
792 self.h5file.root, h5file2.root, recursive=True
793 )
794 self.h5file.close()
795
796 self._check_tree(h5fname2)
797 finally:
798 if Path(h5fname2).is_file():
799 Path(h5fname2).unlink()
800
801 def test01c_copyDeepTree(self):
802 """Copy of a large depth object tree with no 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