def test_contains(self): outer = Range(0,5) inner = Range(2,3) self.assertTrue(outer.contains(inner))
def test_partially_contains(self): outer = Range(3,5) inner = Range(2,3) self.assertTrue(outer.partially_contains(inner)) inner = Range(3,3) self.assertTrue(outer.partially_contains(inner))
def test_split(self): range = Range(3,5) expected_split = (Range(3,4), Range(5,5)) self.assertEquals(expected_split, range.split())