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

Method test02b_appendFile2

tables/tests/test_basics.py:205–220  ·  view source on GitHub ↗

Checking appending objects to an existing file ("a" version)

(self)

Source from the content-addressed store, hash-verified

203 self.assertEqual(title, "Title example 2")
204
205 def test02b_appendFile2(self):
206 """Checking appending objects to an existing file ("a" version)"""
207
208 # Append a new array to the existing file
209 self._reopen(mode="a", node_cache_slots=self.node_cache_slots)
210 self.h5file.create_array(
211 self.h5file.root, "array2", [3, 4], title="Title example 2"
212 )
213
214 # Open this file in read-only mode
215 self._reopen(node_cache_slots=self.node_cache_slots)
216
217 # Get the CLASS attribute of the arr object
218 title = self.h5file.root.array2.get_attr("TITLE")
219
220 self.assertEqual(title, "Title example 2")
221
222 # Begin to raise errors...
223

Callers

nothing calls this directly

Calls 3

get_attrMethod · 0.80
_reopenMethod · 0.45
create_arrayMethod · 0.45

Tested by

no test coverage detected