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

Method test02_append

tables/tests/test_enum.py:308–324  ·  view source on GitHub ↗

Appending enumerated values using ``table.append()``.

(self)

Source from the content-addressed store, hash-verified

306 )
307
308 def test02_append(self):
309 """Appending enumerated values using ``table.append()``."""
310
311 tbl = self.h5file.create_table(
312 "/", "test", self._description(), title=self._getMethodName()
313 )
314
315 appended = [(10, self.valueInEnum), (20, self.valueOutOfEnum)]
316
317 tbl.append(appended)
318 tbl.flush()
319 tbl.flavor = "python"
320 read = tbl.read()
321 common.verbosePrint(
322 "* appended value: %s\n" "* read value: %s\n" % (appended, read)
323 )
324 self.assertEqual(appended, read, "Written and read values differ.")
325
326 def test03_setitem(self):
327 """Changing enumerated values using ``table.__setitem__()``."""

Callers

nothing calls this directly

Calls 6

_descriptionMethod · 0.95
_getMethodNameMethod · 0.80
create_tableMethod · 0.45
appendMethod · 0.45
flushMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected