def test_02(self): """ Tests that p2p.load_inputs() does not cause failure and produces the expected result. """ hints = {'idx':'name', 'lat':'y', 'lon':'x'} transit_matrix_1 = TransitMatrix('walk', primary_input='tests/test_data/sources.csv', secondary_input='tests/test_data/dests.csv', primary_hints=hints, secondary_hints=hints) transit_matrix_1._load_inputs() try: assert len(transit_matrix_1.primary_data) > 0 and len(transit_matrix_1.secondary_data) > 0 except: assert False
def test_03(self): """ Tests that calling the network interface does not cause failure and produces the expected result """ hints = {'idx':'name', 'lat':'y', 'lon':'x'} transit_matrix_1 = TransitMatrix('walk', primary_input='tests/test_data/sources.csv', secondary_input='tests/test_data/dests.csv', primary_hints=hints, secondary_hints=hints) transit_matrix_1._load_inputs() transit_matrix_1._network_interface.load_network(transit_matrix_1.primary_data, transit_matrix_1.secondary_data, secondary_input=True, epsilon=transit_matrix_1.configs.epsilon) assert transit_matrix_1._network_interface.number_of_nodes() > 0 assert transit_matrix_1._network_interface.number_of_edges() > 0