Skip to content

Commit 6c83a23

Browse files
test: Add simple chunking tests
1 parent 09e4817 commit 6c83a23

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

tests/test_algorithm.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
from src.thread.utils import algorithm
2+
3+
4+
def test_chunking_1():
5+
assert algorithm.chunk_split(5, 1) == [(0, 5)]
6+
7+
8+
def test_chunking_2():
9+
assert algorithm.chunk_split(5, 2) == [(0, 3), (3, 5)]
10+
11+
12+
def test_chunking_3():
13+
assert algorithm.chunk_split(100, 8) == [
14+
(0, 13),
15+
(13, 26),
16+
(26, 39),
17+
(39, 52),
18+
(52, 64),
19+
(64, 76),
20+
(76, 88),
21+
(88, 100),
22+
]

0 commit comments

Comments
 (0)