def test_import_locations_broken_wmo(self): stations = Stations(open('tests/data/broken_WMO_stations')) data = sorted(stations.items()) assert '%s - %s' % data[0] == \ '71046 - Komakuk Beach, Y. T. (CWKM - N69.617°; W140.200°)' assert '%s - %s' % data[1] == \ '71899 - Langara, B. C. (CWLA - N54.250°; W133.133°)'
def test_import_locations_broken_icao(self): stations = Stations(open('tests/data/broken_ICAO_stations'), 'ICAO') data = sorted(stations.items()) assert '%s - %s' % data[0] == \ 'KBRX - Bordeaux (N41.933°; W104.950°)' assert '%s - %s' % data[1] == \ 'KCQB - Chandler, Chandler Municipal Airport (N35.724°; W096.820°)' assert '%s - %s' % data[2] == \ 'KTYR - Tyler, Tyler Pounds Field (N32.359°; W095.404°)'
def test_import_locations_icao(self): stations = Stations(open('tests/data/ICAO_stations'), 'ICAO') data = sorted(stations.items()) assert '%s - %s' % data[0] == \ 'AYMD - Madang (94014 - S05.217°; E145.783°)' assert '%s - %s' % data[1] == \ 'AYMO - Manus Island/Momote (S02.062°; E147.424°)' assert '%s - %s' % data[2] == \ 'AYPY - Moresby (94035 - S09.433°; E147.217°)'
def test_import_locations_wmo(self): stations = Stations(open('tests/data/WMO_stations')) data = sorted(stations.items()) assert '%s - %s' % data[0] == \ '00000 - Buckland, Buckland Airport (PABL - N65.982°; W161.152°)' assert '%s - %s' % data[1] == \ '01001 - Jan Mayen (ENJA - N70.933°; W008.667°)' assert '%s - %s' % data[2] == \ '01002 - Grahuken (N79.783°; E014.467°)'