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