def test_full(self):
    from ..circular_buffer import CircularBuffer
    from numpy import random, sum
    buffer = CircularBuffer(shape=(100, 2, 3), dtype='float64')
    data = random.randint(1024, size=(50, 2, 3))
    buffer.append(data)
    assert (buffer.pointer == 49)
    assert (buffer.g_pointer == 49)
    assert (buffer.shape == (100, 2, 3))
    assert (buffer.size == ((buffer.buffer.shape[0] * buffer.buffer.shape[1]) * buffer.buffer.shape[2]))
    assert (buffer.dtype == 'float64')
    assert (sum(buffer.get_i_j(i=5, j=6)) == sum(buffer.buffer[5]))
    assert (sum(buffer.get_i_j(i=5, j=10)) == sum(buffer.get_N(N=5, M=9)))
def test_full(self):
    from ..circular_buffer import CircularBuffer
    from numpy import random, sum
    buffer = CircularBuffer(shape=(100, 2, 3), dtype='float64')
    data = random.randint(1024, size=(50, 2, 3))
    buffer.append(data)
    assert (buffer.pointer == 49)
    assert (buffer.g_pointer == 49)
    assert (buffer.shape == (100, 2, 3))
    assert (buffer.size == ((buffer.buffer.shape[0] * buffer.buffer.shape[1]) * buffer.buffer.shape[2]))
    assert (buffer.dtype == 'float64')
    assert (sum(buffer.get_i_j(i=5, j=6)) == sum(buffer.buffer[5]))
    assert (sum(buffer.get_i_j(i=5, j=10)) == sum(buffer.get_N(N=5, M=9)))