def test_dataset_buffer__compute_chunk_count(): one_year_at_5_minutes = 60 / 5 * 24 * 365 assert DatasetBuffer.compute_chunk_count(num_columns=4, max_size=96, dtype=np.float) == 96 assert DatasetBuffer.compute_chunk_count(num_columns=4, max_size=one_year_at_5_minutes, dtype=np.float) == 1024 assert DatasetBuffer.compute_chunk_count(num_columns=6, max_size=one_year_at_5_minutes, dtype=np.complex) == 341
def test_dataset_buffer__compute_chunk_count(): one_year_at_5_minutes = 60 / 5 * 24 * 365 assert DatasetBuffer.compute_chunk_count( num_columns=4, max_size=96, dtype=float ) == 96 assert DatasetBuffer.compute_chunk_count( num_columns=4, max_size=one_year_at_5_minutes, dtype=float, max_chunk_bytes=128 * 1024, ) == 4096 assert DatasetBuffer.compute_chunk_count( num_columns=6, max_size=one_year_at_5_minutes, dtype=complex, max_chunk_bytes=128 * 1024, ) == 1365