예제 #1
0
 def test_different_signs(self):
     "Sending parameters of different signs raises a ValueError."
     with self.assertRaises(ValueError):
         _convert_coords(-89, 37, 43.91 )
     with self.assertRaises(ValueError):
         _convert_coords(0, -37, 43.91 )
     _convert_coords(0, 37, 43.91 )
     _convert_coords(0, 0, 43.91 )
     _convert_coords(0, 0, -43.91 )
예제 #2
0
 def test_negative(self):
     observed = _convert_coords(-89, -37, -43.91 )
     self.assertAlmostEquals(observed, 89.62886388888889, delta = 10**10)
예제 #3
0
 def test_positive(self):
     observed = _convert_coords(29, 16, 38.24 )
     self.assertAlmostEqual(observed, 29.27728888, delta = 10**10)