def run_flight_path(path, max_points=None): flight = Flight(path) if max_points: flight.reduce(threshold=0, max_points=max_points) return flight.path()
def test_reduce(): from xcsoar import Flight flight = Flight(join(FIXTURES_PATH, '654g6ng1.igc')) assert len(flight.path()) == 9762 flight.reduce(threshold=0, max_points=5000) assert len(flight.path()) < 5000