Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
true-real-michael committed Nov 10, 2023
1 parent a59e659 commit 8f52fe5
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions test/grid/test_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ def generated_grid():
def test_n_leaves(generated_grid):
grid, pose_points = generated_grid

# visualize_grid(grid)
assert grid.n_leaves(0) == 2
assert grid.n_leaves(1) == 3
grid.subdivide([lambda points: len(points) > 2])
Expand Down Expand Up @@ -87,19 +86,18 @@ def test_get_points(generated_grid):


@pytest.mark.parametrize(
"subdivision_criteria, nodes_expected, leaves_expected",
"subdivision_criteria, leaves_expected",
[
([lambda points: len(points) > 2], [7, 8], [4, 5]),
([lambda points: len(points) > 3], [4, 6], [3, 5]),
([lambda points: len(points) > 2], [4, 5]),
([lambda points: len(points) > 3], [3, 5]),
],
)
def test_subdivide(
generated_grid, subdivision_criteria, nodes_expected, leaves_expected
generated_grid, subdivision_criteria, leaves_expected
):
grid, pose_points = generated_grid

grid.subdivide(subdivision_criteria)
# assert nodes_expected == [grid.n_nodes(0), grid.n_nodes(1)]
assert leaves_expected == [grid.n_leaves(0), grid.n_leaves(1)]


Expand Down

0 comments on commit 8f52fe5

Please sign in to comment.