Ejemplo n.º 1
0
 def testPoint(self):
     p1 = Point(0, 0)
     p2 = Point(0, 2)
     self.assertEqual(p1.distance(p2), 2)
     self.assertEqual(p1.distance((0, 1)), 1)
     self.assertEqual(p1.get_coordinates(), [(0, 0)])
     self.assertEqual(p1, p1.copy())
Ejemplo n.º 2
0
def test_point():
    p1 = Point(0, 0)
    p2 = Point(0, 2)
    assert p1.distance(p2) == 2
    assert p1.distance((0, 1)) == 1
    assert p1.get_coordinates() == [(0, 0)]
    assert p1 == p1.copy()
Ejemplo n.º 3
0
	def testPoint(self):
		p1 = Point(0,0)
		p2 = Point(0,2)
		self.assertEqual(p1.distance(p2), 2)
		self.assertEqual(p1.distance((0,1)), 1)
		self.assertEqual(p1.get_coordinates(), [(0,0)])
		self.assertEqual(p1, p1.copy())
def test_point():
	p1 = Point(0, 0)
	p2 = Point(0, 2)
	assert p1.distance(p2) == 2
	assert p1.distance((0, 1)) == 1
	assert p1.get_coordinates() == [(0, 0)]
	assert p1 == p1.copy()