from range import from_indexes, Range def test_from_indexes(): assert from_indexes([]) == [] assert from_indexes([1]) == [Range(1, 1)] assert from_indexes([9, 6, 0, 10]) == [Range(0, 1), Range(6, 1), Range(9, 2)]