devkit_f2c_planner.test_run_f2c
Unit tests for _run_f2c() orchestration, with fields2cover replaced by FakeF2C.
FakeF2C returns canned swaths, so these tests cover what the planner does around
fields2cover: boundary projection, angle wrapping, headland fallback, snake
ordering, obstacle clipping and projection back to lat/lon. They do not cover
fields2cover’s own swath generation.
Classes
-
class devkit_f2c_planner.test_run_f2c.RunF2CTest(methodName='runTest')[source]
Bases: TestCase
-
assert_rows_almost_equal(actual: list, expected: list) → None[source]
-
run_planner(fake: FakeF2C, obstacles_xy: list | None = None, angle_deg: float = 0.0, **kwargs) → list[source]
Run _run_f2c() against the fake; returns rows in local xy metres.
-
setUp()[source]
Hook method for setting up the test fixture before exercising it.
-
test_angle_is_wrapped_to_a_half_turn_and_passed_in_radians()[source]
-
test_boundary_is_projected_with_the_first_corner_as_origin()[source]
-
test_clipped_fragments_follow_the_snake_direction()[source]
-
test_fragments_longer_than_half_the_tool_width_are_kept()[source]
-
test_fragments_shorter_than_half_the_tool_width_are_dropped()[source]
-
test_headland_generator_failure_falls_back_to_the_full_boundary()[source]
-
test_headland_swaths_are_generated_on_the_inset_cell()[source]
-
test_headland_that_leaves_no_cells_falls_back_to_the_full_boundary()[source]
-
test_invalid_obstacle_is_not_given_to_f2c()[source]
-
test_no_headland_uses_the_full_boundary_without_calling_the_generator()[source]
-
test_obstacle_clips_swaths_even_though_f2c_ignored_it()[source]
-
test_obstacle_padding_widens_the_gap()[source]
-
test_obstacles_are_also_given_to_f2c_as_hole_rings()[source]
-
test_result_is_projected_back_to_latlon_at_the_first_corner()[source]
-
test_snake_order_reverses_every_second_swath()[source]
-
test_swaths_with_fewer_than_two_points_are_ignored_and_do_not_shift_the_snake_order()[source]
-
test_tool_width_is_passed_to_swath_generation()[source]
-
test_without_snake_order_swaths_keep_the_direction_f2c_gave_them()[source]