Exemplo n.º 1
0
 def test_creation_from_tuple(self):
     s1 = IntegerSegment((0, 0), (2, 0))
     self.assertTupleEqual(s1.tuple(), ((0, 0), (2, 0)))
Exemplo n.º 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()))
Exemplo n.º 3
0
 def test_default_initialization(self):
     s1 = IntegerSegment()
     self.assertTupleEqual(s1.tuple(), ((0, 0), (0, 0)))