예제 #1
0
def report_airports_near_location():
    """List airports near specified geolocation"""
    context = ReportContext()
    context.location = (prompt.real("Latitude: "), prompt.real("Longitude: "))
    context.distance = prompt.integer("Distance (in miles): ")

    print("IATA\tAirport Name\t\t\t\t\tState\tCity\t\t\t\tDistance")
    print("-" * 105)

    impl().report_airports_near_location(context)
예제 #2
0
def test_real(input_patch):
    input_patch.do("1.0")
    assert prompt.real() == 1.0
예제 #3
0
def test_real():
    assert prompt.real(empty=True) is None
    assert prompt.real(default=1.0) is 1.0
예제 #4
0
def test_real():
    assert prompt.real(empty=True) is None