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

Method test10c_moveLeaf

tables/tests/test_basics.py:621–632  ·  view source on GitHub ↗

Checking moving Leaves and modify attributes after that.

(self)

Source from the content-addressed store, hash-verified

619 self.h5file.root.anarray
620
621 def test10c_moveLeaf(self):
622 """Checking moving Leaves and modify attributes after that."""
623
624 self._reopen(mode="r+", node_cache_slots=self.node_cache_slots)
625 newgroup = self.h5file.create_group("/", "newgroup")
626 self.h5file.move_node(self.h5file.root.anarray, newgroup, "anarray2")
627 array_ = self.h5file.root.newgroup.anarray2
628 array_.attrs.TITLE = "hello"
629
630 # Ensure that the new attribute has been written correctly
631 self.assertEqual(array_.title, "hello")
632 self.assertEqual(array_.attrs.TITLE, "hello")
633
634 def test10d_moveToExistingLeaf(self):
635 """Checking moving a leaf to an existing name."""

Callers

nothing calls this directly

Calls 3

create_groupMethod · 0.80
move_nodeMethod · 0.80
_reopenMethod · 0.45

Tested by

no test coverage detected