def setUp(self):
        self.edges = [
            (1, 2),
            (3, 4),
            (3, 5),
        ]

        self.obj = StationConnections()
        for edge in self.edges:
            self.obj.add_connection(edge)
Ejemplo n.º 2
0
    def read_data(self, stations_file, connections_file):
        with open(stations_file) as csvfile:
            reader = csv.reader(csvfile, delimiter=',')
            self.tfl_stations = {int(row[0]): row[1] for row in reader}

        self.tfl_connections = StationConnections()
        with open(connections_file) as csvfile:
            reader = csv.reader(csvfile, delimiter=',')
            for row in reader:
                self.tfl_connections.add_connection(row)
 def tearDown(self):
     self.obj = StationConnections()
     for edge in self.edges:
         self.obj.add_connection(edge)