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

Method populate_file

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

Source from the content-addressed store, hash-verified

2846 self.populate_file()
2847
2848 def populate_file(self):
2849 self.array = np.zeros(self.shape, self.dtype)
2850 for row_num, row in enumerate(self.array):
2851 start = row_num * len(self.array.dtype.names)
2852 for value, col in enumerate(self.array.dtype.names, start):
2853 row[col] = value
2854 self.table.append(self.array)
2855 self.assertEqual(len(self.table), len(self.array))
2856
2857 def test_read_all(self):
2858 output = self.table.read()

Callers 1

setUpMethod · 0.95

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected