Beispiel #1
0
 def test_get_path_cost_simple(self):
     result = get_path_cost(["S", "A"])
     self.assertEqual(result, 3)
Beispiel #2
0
 def test_get_path_cost_four_nodes(self):
     result = get_path_cost(["S", "B", "C", "A"])
     self.assertEqual(result, 4)
Beispiel #3
0
 def test_get_path_cost_not_starting_from_s(self):
     result = get_path_cost(["C", "A"])
     self.assertEqual(result, 2)
Beispiel #4
0
 def test_get_path_cost_two_single(self):
     result = get_path_cost(["S"])
     self.assertEqual(result, 0)
Beispiel #5
0
 def test_get_path_cost_two_empty(self):
     result = get_path_cost([])
     self.assertEqual(result, 0)
Beispiel #6
0
 def test_get_path_cost_two_nodes(self):
     result = get_path_cost(["S", "A", "C"])
     self.assertEqual(result, 5)