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

Method test10_2c_moveTable

tables/tests/test_basics.py:708–719  ·  view source on GitHub ↗

Checking moving tables and modify attributes after that.

(self)

Source from the content-addressed store, hash-verified

706 self.assertEqual(table_.nrows, nrows + 1)
707
708 def test10_2c_moveTable(self):
709 """Checking moving tables and modify attributes after that."""
710
711 self._reopen(mode="r+", node_cache_slots=self.node_cache_slots)
712 newgroup = self.h5file.create_group("/", "newgroup")
713 self.h5file.move_node(self.h5file.root.atable, newgroup, "atable2")
714 table_ = self.h5file.root.newgroup.atable2
715 table_.attrs.TITLE = "hello"
716
717 # Ensure that the new attribute has been written correctly
718 self.assertEqual(table_.title, "hello")
719 self.assertEqual(table_.attrs.TITLE, "hello")
720
721 def test10_2d_moveToExistingTable(self):
722 """Checking moving a table 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