def test_two_values(self): indices = [0, 1] vals = ['a', 'b'] expected = ['a', 'b'] res = filter_by_indices(good_indices=indices, vals=vals) self.verify_iterable_works_more_than_once(res, expected)
def test_normal_case(self): indices = [0, 3, 5] vals = ['a', 'b', 'c', 'd', 'e', 'f'] expected = ['a', 'd', 'f'] res = filter_by_indices(good_indices=indices, vals=vals) self.verify_iterable_works_more_than_once(res, expected)