def test_batches_size_must_be_strictly_positive(size): with pytest.raises(ValueError): list(batches([1, 2, 3], size=size))
def test_batches(items, size, output): # type: (list, int, list) -> None assert list(batches(items, size=size)) == output