Exemplo n.º 1
0
 def test_distance(self):
     # check for expected distance
     self.assertEqual("%.2f" % distance(self.santa_clara, self.san_francisco),
                      "%.2f" % 61.8861907035) # km
Exemplo n.º 2
0
 def test_distance_zero(self):
     # check that distance between 2 equal points is 0
     self.assertEqual(distance(self.santa_clara, self.santa_clara),
                      0)