示例#1
0
def test_batch_single():
    for batch_size in range(1, 10):
        batched = tuple(main.batch([1], batch_size=batch_size))
        assert batched == ((1,),)
示例#2
0
def test_batch_single():
    for batch_size in range(1, 10):
        batched = tuple(main.batch([1], batch_size=batch_size))
        assert batched == ((1, ), )
示例#3
0
def test_batch_empty():
    for batch_size in range(1, 10):
        assert len(
            list(main.batch([], batch_size=batch_size))) == 0
示例#4
0
def test_batch_empty():
    for batch_size in range(1, 10):
        assert len(list(main.batch([], batch_size=batch_size))) == 0