File: test_chunks.py

package info (click to toggle)
python-easydev 0.13.3%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 636 kB
  • sloc: python: 1,904; makefile: 116; javascript: 49
file content (10 lines) | stat: -rw-r--r-- 250 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
from easydev import split_into_chunks


def test_chunks():

    assert list(split_into_chunks([0, 1, 2, 3, 4, 5, 6], 2)) == [[0, 2, 4, 6], [1, 3, 5]]
    assert list(split_into_chunks([0, 1, 2, 3, 4, 5], 2)) == [[0, 2, 4], [1, 3, 5]]


test_chunks()