Ejemplo n.º 1
0
def lookup_pairs(datasource):
    """ Create data structure from parsed pair_routes.xml """
    lookup_dict = {}
    count = 0
    start = time.time()
    while count < len(parse_pair_id(datasource)):
        lookup_dict[parse_pair_id(datasource)[count]\
            [u'PairID']] = parse_tags(datasource, count)
        count += 1
    # logging loops
    logging.info("Time elapsed for lookup_pairs parse: "+\
                 str(time.time() - start))
    return lookup_dict
Ejemplo n.º 2
0
def lookup_pairs(datasource):
    """ Create data structure from parsed pair_routes.xml """
    lookup_dict = {}
    count = 0
    start = time.time()
    while count < len(parse_pair_id(datasource)):
        lookup_dict[parse_pair_id(datasource)[count]\
            [u'PairID']] = parse_tags(datasource, count)
        count += 1
    # logging loops
    logging.info("Time elapsed for lookup_pairs parse: "+\
                 str(time.time() - start))
    return lookup_dict
Ejemplo n.º 3
0
 def test_parse_pair_id(self):
     """ Did we retrieve pair_id successfully? """
     nt.assert_equal(len(parse_pair_id(self.open_xml())),2)
Ejemplo n.º 4
0
 def test_parse_pair_id(self):
     """ Did we retrieve pair_id successfully? """
     nt.assert_equal(len(parse_pair_id(self.open_xml())), 2)