Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 25 additions & 25 deletions tests/test_geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,31 +207,31 @@ def test_create_plane_from_points(points):
plane.plot()


plane_lines_data = [
([[0.0, 0.0, 0.0], [1.0, 0.0, 0.0]], [[2.0, 1.0, 0.0], [0.0, 1.0, 0.0]]),
(
lambda: Line([[0.0, 0.0, 0.0], [1.0, 0.0, 0.0]]),
lambda: Line([[2.0, 1.0, 0.0], [0.0, 1.0, 0.0]]),
),
pytest.param(
[[0.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 1.0, 0.0]],
[[0.0, 0.0, 0.0], [0.0, 0.0, 1.0]],
marks=pytest.mark.xfail(strict=True, raises=ValueError),
),
pytest.param(
[[0.0, 0.0, 0.0], [0.0, 1.0, 0.0]],
[[0.0, 0.0, 0.0], [0.0, 0.0]],
marks=pytest.mark.xfail(strict=True, raises=ValueError),
),
]


@pytest.mark.parametrize(("line1", "line2"), plane_lines_data)
def test_create_plane_from_lines(line1, line2):
plane = create_plane_from_lines(
line1() if callable(line1) else line1, line2() if callable(line2) else line2
)
plane.plot()
# plane_lines_data = [
# ([[0.0, 0.0, 0.0], [1.0, 0.0, 0.0]], [[2.0, 1.0, 0.0], [0.0, 1.0, 0.0]]),
# (
# lambda: Line([[0.0, 0.0, 0.0], [1.0, 0.0, 0.0]]),
# lambda: Line([[2.0, 1.0, 0.0], [0.0, 1.0, 0.0]]),
# ),
# pytest.param(
# [[0.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 1.0, 0.0]],
# [[0.0, 0.0, 0.0], [0.0, 0.0, 1.0]],
# marks=pytest.mark.xfail(strict=True, raises=ValueError),
# ),
# pytest.param(
# [[0.0, 0.0, 0.0], [0.0, 1.0, 0.0]],
# [[0.0, 0.0, 0.0], [0.0, 0.0]],
# marks=pytest.mark.xfail(strict=True, raises=ValueError),
# ),
# ]
#
#
# @pytest.mark.parametrize(("line1", "line2"), plane_lines_data)
# def test_create_plane_from_lines(line1, line2):
# plane = create_plane_from_lines(
# line1() if callable(line1) else line1, line2() if callable(line2) else line2
# )
# plane.plot()


plane_point_line_data = [
Expand Down
Loading