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

Method test10_2b_moveTable

tables/tests/test_basics.py:665–680  ·  view source on GitHub ↗

Checking moving a table and access it without a close/open.

(self)

Source from the content-addressed store, hash-verified

663 self.h5file.root.atable
664
665 def test10_2b_moveTable(self):
666 """Checking moving a table and access it without a close/open."""
667
668 self._reopen(mode="r+", node_cache_slots=self.node_cache_slots)
669 newgroup = self.h5file.create_group("/", "newgroup")
670 self.h5file.move_node(self.h5file.root.atable, newgroup, "atable2")
671
672 # Ensure that the new name exists
673 table_ = self.h5file.root.newgroup.atable2
674 self.assertEqual(table_.name, "atable2")
675 self.assertEqual(table_._v_pathname, "/newgroup/atable2")
676 self.assertEqual(table_._v_depth, 2)
677
678 # Try to get the previous object with the old name
679 with self.assertRaises(LookupError):
680 self.h5file.root.atable
681
682 def test10_2b_bis_moveTable(self):
683 """Checking moving a table and use cached row without a close/open."""

Callers

nothing calls this directly

Calls 3

create_groupMethod · 0.80
move_nodeMethod · 0.80
_reopenMethod · 0.45

Tested by

no test coverage detected