Skip to content

Commit 86953ab

Browse files
committed
Test both fast and slow paths and make sure they give same result.
1 parent 7534eef commit 86953ab

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

toolz/tests/test_itertoolz.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,9 @@ def __eq__(self, other):
325325
return True
326326
raise ValueError()
327327
obj = NoCompare()
328-
assert list(partition_all(2, [obj]*3)) == [(obj, obj), (obj,)]
328+
result = [(obj, obj, obj, obj), (obj, obj, obj)]
329+
assert list(partition_all(4, [obj]*7)) == result
330+
assert list(partition_all(4, iter([obj]*7))) == result
329331

330332

331333
def test_count():

0 commit comments

Comments
 (0)