def test_creation_from_tuple(self): s1 = IntegerSegment((0, 0), (2, 0)) self.assertTupleEqual(s1.tuple(), ((0, 0), (2, 0)))
def test_tuple(self): p1 = IntegerPoint(0, 1) p2 = IntegerPoint(1, 1) res = IntegerSegment(p1, p2) self.assertTupleEqual(res.tuple(), (p1.tuple(), p2.tuple()))
def test_default_initialization(self): s1 = IntegerSegment() self.assertTupleEqual(s1.tuple(), ((0, 0), (0, 0)))