Пример #1
0
 def parse_page(self, response):
     print 'hi'
     gp = Graph()
     connectionGraph = gp.make_graph_from_file('/Users/raviramadoss/spirit/spirit connections')
     sample = gp.test_graph
     print gp.find_all_paths_with_max_hop(connectionGraph, 'TPA', 'SFO')
     return
     print response.url
     print response.body
     yield Request(url=self.landing_page, callback=self.check_logged)
Пример #2
0
 def test_find_shortest_path(self):
     gp = Graph()
     self.assertEquals(gp.find_shortest_path(gp.test_graph, 'A', 'D'), ['A', 'B', 'D'])