コード例 #1
0
ファイル: tests_graph.py プロジェクト: Eve208/ORIE5270
 def test_shortest1(self):
     self.path1 = find_shortest_path("graph.txt", 1, 8)
     self.answer1 = (8.0, [1.0, 3.0, 5.0, 7.0, 8.0])
     assert self.path1 == self.answer1
コード例 #2
0
ファイル: tests_graph.py プロジェクト: Eve208/ORIE5270
 def test_shortest2(self):
     self.path2 = find_shortest_path("graph.txt", 1, 1)
     self.answer2 = (0, [1.0])
     assert self.path2 == self.answer2
コード例 #3
0
ファイル: tests_graph.py プロジェクト: Eve208/ORIE5270
 def test_shortest3(self):
     self.path3 = find_shortest_path("graph.txt", 2, 7)
     self.answer3 = None
     assert self.path3 == self.answer3
コード例 #4
0
ファイル: test_graph.py プロジェクト: Johnzhong1468/ORIE5270
 def test_shortest_1(self):
     self.answer = (3.0, [1, 5, 8])
     self.input = find_shortest_path("shortest_graph.txt", 1, 8)
     assert self.input == self.answer
コード例 #5
0
ファイル: test_graph.py プロジェクト: Johnzhong1468/ORIE5270
 def test_shortest_5(self):
     self.answer = (3, [1, 2, 4])
     self.input = find_shortest_path("shortest_graph2.txt", 1, 4)
     assert self.input == self.answer
コード例 #6
0
ファイル: test_graph.py プロジェクト: Johnzhong1468/ORIE5270
 def test_shortest_4(self):
     self.answer = (5, [1, 2, 3, 4, 6])
     self.input = find_shortest_path("shortest_graph1.txt", 1, 6)
     assert self.input == self.answer
コード例 #7
0
ファイル: test_graph.py プロジェクト: Johnzhong1468/ORIE5270
 def test_shortest_3(self):
     self.answer = (5, [8, 5, 3, 9])
     self.input = find_shortest_path("shortest_graph.txt", 8, 9)
     assert self.input == self.answer
コード例 #8
0
ファイル: test_graph.py プロジェクト: Johnzhong1468/ORIE5270
 def test_shortest_2(self):
     self.answer = (None, None)
     self.input = find_shortest_path("shortest_graph.txt", 1, 4)
     assert self.input == self.answer