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

Method setUp

tables/nodes/tests/test_filenode.py:956–973  ·  view source on GitHub ↗

This method sets the following instance attributes: * ``h5fname``: the name of the temporary HDF5 file. * ``h5file``, the writable, temporary HDF5 file with a '/test' node * ``datafname``: the name of the data file to be stored in the temporary HDF5 file. *

(self)

Source from the content-addressed store, hash-verified

954 datafname = "test_filenode.dat"
955
956 def setUp(self):
957 """This method sets the following instance attributes:
958
959 * ``h5fname``: the name of the temporary HDF5 file.
960 * ``h5file``, the writable, temporary HDF5 file with a '/test' node
961 * ``datafname``: the name of the data file to be stored in the
962 temporary HDF5 file.
963 * ``data``: the contents of the file ``datafname``
964 * ``testfname``: the name of a temporary file to be written to.
965
966 """
967
968 super().setUp()
969 self.datafname = test_file(self.datafname)
970 self.testfname = tempfile.mktemp()
971 self.testh5fname = tempfile.mktemp(suffix=".h5")
972 self.data = Path(self.datafname).read_bytes()
973 self.testdir = tempfile.mkdtemp()
974
975 def tearDown(self):
976 """tearDown() -> None

Callers

nothing calls this directly

Calls 2

test_fileFunction · 0.85
setUpMethod · 0.45

Tested by

no test coverage detected