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

Method setUp

tables/tests/test_tree.py:973–999  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

971 """Check for hidden groups, leaves and hierarchies."""
972
973 def setUp(self):
974 super().setUp()
975
976 self.visible = [] # list of visible object paths
977 self.hidden = [] # list of hidden object paths
978
979 # Create some visible nodes: a, g, g/a1, g/a2, g/g, g/g/a.
980 h5f = self.h5file
981 h5f.create_array("/", "a", [0])
982 g = h5f.create_group("/", "g")
983 h5f.create_array(g, "a1", [0])
984 h5f.create_array(g, "a2", [0])
985 g_g = h5f.create_group(g, "g")
986 h5f.create_array(g_g, "a", [0])
987
988 self.visible.extend(["/a", "/g", "/g/a1", "/g/a2", "/g/g", "/g/g/a"])
989
990 # Create some hidden nodes: _p_a, _p_g, _p_g/a, _p_g/_p_a, g/_p_a.
991 h5f.create_array("/", "_p_a", [0])
992 hg = h5f.create_group("/", "_p_g")
993 h5f.create_array(hg, "a", [0])
994 h5f.create_array(hg, "_p_a", [0])
995 h5f.create_array(g, "_p_a", [0])
996
997 self.hidden.extend(
998 ["/_p_a", "/_p_g", "/_p_g/a", "/_p_g/_p_a", "/g/_p_a"]
999 )
1000
1001 # The test behind commented out because the .objects dictionary
1002 # has been removed (as well as .leaves and .groups)

Callers

nothing calls this directly

Calls 3

create_groupMethod · 0.80
setUpMethod · 0.45
create_arrayMethod · 0.45

Tested by

no test coverage detected