Commit e1e5d142 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 1851fe29
......@@ -292,5 +292,15 @@ def test_keyvSliceBy():
assert X([1,3,5,10,17], 3,10) == [3,5]
# XXX test_keyvSliceBy
# XXX test_iterSplitByN
def test_iterSplitByN():
def X(lo, hi, nsplit):
return tuple(xbtree._iterSplitByN(lo, hi, nsplit))
assert X(0,0, 0) == ( [0,0] ,)
assert X(0,0, 1) == ( )
assert X(0,1, 0) == ( [0,1] ,)
assert X(0,1, 1) == ( )
assert X(0,2, 0) == ( [0,2] ,)
assert X(0,2, 1) == ( [0,1,2] ,)
assert X(0,2, 2) == ( )
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment