def test_padwith(self): eq_(batch([1, 2, 3, 4, 5], '2,FOO'), [[1, 2], [3, 4], [5, 'FOO']])
def test_batch_edgecases(self): eq_(batch([1, 2, 3, 4, 5], '0'), []) eq_(batch([1, 2, 3, 4, 5], '1'), [1, 2, 3, 4, 5])
def test_batch(self): eq_(batch([], '2'), []) eq_(batch([1, 2, 3, 4, 5], '2'), [[1, 2], [3, 4], [5]]) eq_(batch([1, 2, 3, 4, 5], '3'), [[1, 2, 3], [4, 5]])
def test_padwith(self): assert batch([1, 2, 3, 4, 5], '2,FOO') == [[1, 2], [3, 4], [5, 'FOO']]
def test_batch_edgecases(self): assert batch([1, 2, 3, 4, 5], '0') == [] assert batch([1, 2, 3, 4, 5], '1') == [1, 2, 3, 4, 5]
def test_batch(self): assert batch([], '2') == [] assert batch([1, 2, 3, 4, 5], '2') == [[1, 2], [3, 4], [5]] assert batch([1, 2, 3, 4, 5], '3') == [[1, 2, 3], [4, 5]]