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

Method test00a_reopen

tables/tests/test_enum.py:424–438  ·  view source on GitHub ↗

Reopening a file with extendable arrays using enumerated data.

(self)

Source from the content-addressed store, hash-verified

422 return tb.EnumAtom(self.enum, "red", base=self.enumType, shape=shape)
423
424 def test00a_reopen(self):
425 """Reopening a file with extendable arrays using enumerated data."""
426
427 self.h5file.create_earray(
428 "/", "test", self._atom(), shape=(0,), title=self._getMethodName()
429 )
430 self.h5file.root.test.flavor = "python"
431
432 self._reopen()
433
434 self.assertEqual(
435 self.h5file.root.test.get_enum(),
436 self.enum,
437 "Enumerated type was not restored correctly from disk.",
438 )
439
440 def test00b_reopenMD(self):
441 """Reopening a file with extendable arrays using enumerated

Callers

nothing calls this directly

Calls 5

_atomMethod · 0.95
create_earrayMethod · 0.80
_getMethodNameMethod · 0.80
_reopenMethod · 0.45
get_enumMethod · 0.45

Tested by

no test coverage detected