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