Ejemplo n.º 1
0
def test_search() -> None:
    assert (airports.search("denmark").query(
        'type == "large_airport"')  # type: ignore
            .data.icao.str.startswith("EK").all())
    assert (airports.search("ITALY").query(
        'type == "large_airport"')  # type: ignore
            .data.icao.str.startswith("LI").all())
Ejemplo n.º 2
0
def test_search() -> None:
    denmark = airports.search("denmark")
    assert denmark is not None
    denmark_large = denmark.query('type == "large_airport"')
    assert denmark_large is not None
    assert denmark_large.data.icao.str.startswith("EK").all()

    italy = airports.search("ITALY")
    assert italy is not None
    italy_large = italy.query('type == "large_airport"')
    assert italy_large is not None
    assert italy_large.data.icao.str.startswith("LI").all()
Ejemplo n.º 3
0
def getUSAirports():
    if logLvl >= 1:
        print("Getting US Airports from remote database")
    usAirports = airports.search(country)
    usAirports.to_json(airportsFilename)

    if logLvl >= 1:
        print("Found " + str(len(usAirports)) + " US Airports")

    return usAirports
Ejemplo n.º 4
0
def test_search() -> None:
    assert airports.search("denmark").data.icao.str.startswith("EK").all()
    assert airports.search("ITALY").data.icao.str.startswith("LI").all()
Ejemplo n.º 5
0
def getUSAirports():
    usAirports = airports.search(country)
    usAirports.to_json(filename)
    return usAirports