Skip to content

Add unit tests for flight event labeling #174

Description

@Sanjana-Siddani

Description

The project uses rules in label_generator.py to assign flight-event labels. These rules do not currently have automated unit tests.

Create tests to verify that representative telemetry values generate the expected labels.

Tasks

  • Set up pytest for the inference folder.

  • Create a test file for FlightEventLabeler.

  • Add at least one test for each event:
    TAXI
    TAKEOFF
    CRUISE
    APPROACH
    LANDING
    TURN_LEFT
    TURN_RIGHT
    HIGH_SPEED
    LOW_SPEED
    HIGH_ALTITUDE
    LOW_ALTITUDE
    HIGH_G_FORCE
    NORMAL_FLIGHT

  • Test heading wraparound, such as 359° to 1°.

  • Test values at important boundaries.

  • Add instructions for running the tests.

Acceptance Criteria

  • All 13 expected event labels are tested.
  • Heading wraparound is tested.
  • At least three threshold-boundary cases are tested.
  • Tests run with one documented command.
  • All tests pass locally.
  • Existing production code is not changed unless a bug is found.
  • Any discovered bug is documented separately.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions