Skip to content

Commit

Permalink
Use golf_data.json in unit tests #23
Browse files Browse the repository at this point in the history
  • Loading branch information
RexBerry committed Nov 15, 2024
1 parent aefccb5 commit dfdbb4d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion flight/test_files/airdrop_unit_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ async def run() -> None:
# wait for drone to take off
await asyncio.sleep(10)

flight_settings: FlightSettings = FlightSettings()
flight_settings: FlightSettings = FlightSettings(path_data_path="flight/data/golf_data.json")

logging.info("starting airdrop")

Expand Down
2 changes: 1 addition & 1 deletion flight/test_files/hoffman_waypoint_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from state_machine.drone import Drone

# Defining file path constant for extract_gps
MOVE_TO_TEST_PATH: str = "./data/waypoint_data.json"
MOVE_TO_TEST_PATH: str = "flight/data/golf_data.json"

# Defining altitude and speed
MOVE_TO_TEST_ALTITUDE: int = 12
Expand Down
4 changes: 3 additions & 1 deletion flight/test_files/odlc_state_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ async def run_test(_sim: bool, odlc_count: int = 5) -> None:
drone.use_sim_settings()
else:
drone.use_real_settings()
flight_settings: FlightSettings = FlightSettings(sim_flag=_sim, skip_waypoint=True)
flight_settings: FlightSettings = FlightSettings(
sim_flag=_sim, skip_waypoint=True, path_data_path="flight/data/golf_data.json"
)
await drone.connect_drone()
state_task: asyncio.Task[None] = asyncio.ensure_future(
StateMachine(Start(drone, flight_settings), drone, flight_settings).run()
Expand Down
2 changes: 1 addition & 1 deletion flight/test_files/waypoint_state_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ async def run_test(_sim: bool) -> None: # Temporary fix for unused variable
# Output logging info to stdout
logging.basicConfig(filename="/dev/stdout", level=logging.INFO)

path_data_path: str = "flight/data/waypoint_data.json" if _sim else "flight/data/golf_data.json"
path_data_path: str = "flight/data/golf_data.json"

drone: Drone = Drone()
if _sim:
Expand Down

0 comments on commit dfdbb4d

Please sign in to comment.