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

Method test01_append

tables/tests/test_enum.py:648–670  ·  view source on GitHub ↗

Appending scalar elements of enumerated values.

(self)

Source from the content-addressed store, hash-verified

646 )
647
648 def test01_append(self):
649 """Appending scalar elements of enumerated values."""
650
651 vlarr = self.h5file.create_vlarray(
652 "/", "test", self._atom(), title=self._getMethodName()
653 )
654 vlarr.flavor = "python"
655
656 appended = [
657 [
658 self.valueInEnum,
659 ],
660 [self.valueInEnum, self.valueOutOfEnum],
661 ]
662
663 vlarr.append(appended[0])
664 vlarr.append(appended[1])
665 vlarr.flush()
666 read = vlarr.read()
667 common.verbosePrint(
668 "* appended value: %s\n" "* read value: %s\n" % (appended, read)
669 )
670 self.assertEqual(appended, read, "Written and read values differ.")
671
672 def test02_appendMD(self):
673 """Appending multi-dimensional elements of enumerated values."""

Callers

nothing calls this directly

Calls 6

_atomMethod · 0.95
create_vlarrayMethod · 0.80
_getMethodNameMethod · 0.80
appendMethod · 0.45
flushMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected