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

Method setUp

tables/tests/test_tables.py:7052–7075  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

7050
7051class Issue262TestCase(common.TempFileMixin, common.PyTablesTestCase):
7052 def setUp(self):
7053 super().setUp()
7054
7055 class IRecord(tb.IsDescription):
7056 c1 = tb.Int32Col(pos=1)
7057 c2 = tb.Float64Col(pos=2)
7058
7059 table = self.h5file.create_table("/", "table", IRecord)
7060 table.nrowsinbuf = 3
7061
7062 for i in range(20):
7063 table.row["c1"] = i
7064 table.row["c2"] = i
7065 table.row.append()
7066
7067 table.row["c1"] = i % 29
7068 table.row["c2"] = 300 - i
7069 table.row.append()
7070
7071 table.row["c1"] = 300 - i
7072 table.row["c2"] = 100 + i % 30
7073 table.row.append()
7074
7075 table.flush()
7076
7077 def test_gh260(self):
7078 """Regression test for gh-260"""

Callers

nothing calls this directly

Calls 4

setUpMethod · 0.45
create_tableMethod · 0.45
appendMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected