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

Method test01d_copyDeepTree

tables/tests/test_tree.py:824–846  ·  view source on GitHub ↗

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

(self)

Source from the content-addressed store, hash-verified

822
823 @common.unittest.skipUnless(common.heavy, "only in heavy mode")
824 def test01d_copyDeepTree(self):
825 """Copy of a large depth object tree with static node cache."""
826
827 self.h5file = tb.open_file(
828 self.h5fname, mode="r", node_cache_slots=-256
829 )
830 h5fname2 = tempfile.mktemp(".h5")
831 try:
832 with tb.open_file(
833 h5fname2, mode="w", node_cache_slots=-256
834 ) as h5file2:
835 if common.verbose:
836 print("\nCopying deep tree...")
837
838 self.h5file.copy_node(
839 self.h5file.root, h5file2.root, recursive=True
840 )
841 self.h5file.close()
842
843 self._check_tree(h5fname2)
844 finally:
845 if Path(h5fname2).is_file():
846 Path(h5fname2).unlink()
847
848
849class WideTreeTestCase(common.TempFileMixin, common.PyTablesTestCase):

Callers

nothing calls this directly

Calls 3

_check_treeMethod · 0.95
copy_nodeMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected