Exemple #1
0
 def test_input_a(self):
     self.assertEqual(
         obj.shortesttrip([0, 0, 70], [90, 0, 45], ["1 2", "0 2", "0 1"], 0,
                          1), 6283.185307179586)
Exemple #2
0
 def test_input_e(self):
     self.assertEqual(
         obj.shortesttrip([0, 0, 60], [80, 0, 45], ["1 2", "0 1", "0 1"], 0,
                          1), 5585.0536063818545)
Exemple #3
0
 def test_input_c(self):
     self.assertEqual(
         obj.shortesttrip([0, 20, 55], [-20, 85, 42], ["1", "0", "0"], 0,
                          2), -1.0)
Exemple #4
0
 def test_input_d(self):
     self.assertEqual(
         obj.shortesttrip([0, 0, 70], [90, 0, 45], ["2", "0 2", "0 1"], 0,
                          1), 10612.237799994255)
Exemple #5
0
 def test_input_b(self):
     self.assertEqual(
         obj.shortesttrip([0, 30, 60], [25, -130, 78],
                          ["1 2", "0 2", "1 2"], 0, 0), 0.0)