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

Method test01c_copyDeepTree

tables/tests/test_tree.py:801–821  ·  view source on GitHub ↗

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

(self)

Source from the content-addressed store, hash-verified

799 Path(h5fname2).unlink()
800
801 def test01c_copyDeepTree(self):
802 """Copy of a large depth object tree with no node cache."""
803
804 self.h5file = tb.open_file(self.h5fname, mode="r", node_cache_slots=0)
805 h5fname2 = tempfile.mktemp(".h5")
806 try:
807 with tb.open_file(
808 h5fname2, mode="w", node_cache_slots=0
809 ) as h5file2:
810 if common.verbose:
811 print("\nCopying deep tree...")
812
813 self.h5file.copy_node(
814 self.h5file.root, h5file2.root, recursive=True
815 )
816 self.h5file.close()
817
818 self._check_tree(h5fname2)
819 finally:
820 if Path(h5fname2).is_file():
821 Path(h5fname2).unlink()
822
823 @common.unittest.skipUnless(common.heavy, "only in heavy mode")
824 def test01d_copyDeepTree(self):

Callers

nothing calls this directly

Calls 3

_check_treeMethod · 0.95
copy_nodeMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected