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

Method _reopen

tables/tests/common.py:344–354  ·  view source on GitHub ↗

Reopen ``h5file`` in the specified ``mode``. Returns a true or false value depending on whether the file was reopenend or not. If not, nothing is changed.

(self, mode="r", **kwargs)

Source from the content-addressed store, hash-verified

342 super().tearDown()
343
344 def _reopen(self, mode="r", **kwargs):
345 """Reopen ``h5file`` in the specified ``mode``.
346
347 Returns a true or false value depending on whether the file was
348 reopenend or not. If not, nothing is changed.
349
350 """
351
352 self.h5file.close()
353 self.h5file = tb.open_file(self.h5fname, mode, **kwargs)
354 return True
355
356
357class ShowMemTime(PyTablesTestCase):

Callers 15

test00_attributesMethod · 0.45
test01_iterEArrayMethod · 0.45
test02_sssEArrayMethod · 0.45
test03_readEArrayMethod · 0.45
test04_getitemEArrayMethod · 0.45
test05_setitemEArrayMethod · 0.45
test04b_intMethod · 0.45
test04d_floatMethod · 0.45
test01_copyMethod · 0.45
test02_copyMethod · 0.45
test03a_copyMethod · 0.45

Calls 1

closeMethod · 0.45

Tested by 15

test00_attributesMethod · 0.36
test01_iterEArrayMethod · 0.36
test02_sssEArrayMethod · 0.36
test03_readEArrayMethod · 0.36
test04_getitemEArrayMethod · 0.36
test05_setitemEArrayMethod · 0.36
test04b_intMethod · 0.36
test04d_floatMethod · 0.36
test01_copyMethod · 0.36
test02_copyMethod · 0.36
test03a_copyMethod · 0.36