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

Method setUp

tables/tests/test_indexes.py:2586–2609  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2584 sort_field = None
2585
2586 def setUp(self):
2587 super().setUp()
2588
2589 # create nested table
2590 class Foo(tb.IsDescription):
2591 frame = tb.UInt16Col()
2592
2593 class Bar(tb.IsDescription):
2594 code = tb.UInt16Col()
2595
2596 table = self.h5file.create_table(
2597 "/", "foo", Foo, filters=tb.Filters(3, "zlib"), createparents=True
2598 )
2599
2600 self.h5file.flush()
2601
2602 # fill table with 10 random numbers
2603 for k in range(10):
2604 row = table.row
2605 row["frame"] = np.random.randint(0, 2**16 - 1)
2606 row["Bar/code"] = np.random.randint(0, 2**16 - 1)
2607 row.append()
2608
2609 self.h5file.flush()
2610
2611 def test_copysort(self):
2612 # copy table

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected