def test_left_overlap_out_of_range():
    for _ in range(1000):
        part = u.get_rand_range_part()
        y = u.get_rand_int_in_range_exclusive(part.a, part.b)
        x = u.get_rand_int_below_exclusive(part.a)
        other = RangePart(x, y)
        assert other.a < part.a < other.b < part.b
        assert part.left_overlap_with(other) and other.right_overlap_with(part)
def test_no_overlap():
    for _ in range(1000):
        part = u.get_rand_range_part()
        x = u.get_rand_int_above_exclusive(part.b)
        y = u.get_rand_int_above_exclusive(x)
        other = RangePart(x, y)
        assert not other.right_overlap_with(
            part) and not other.left_overlap_with(part)
        assert other > part and part < other and part != other