def test_reversed(): slt = SortedList(range(10000)) rev = slt.reversed() assert all(tup[0] == tup[1] for tup in zip(range(9999, -1, -1), rev))