Skip to content

Commit

Permalink
#1 Fix tests on Windows x64
Browse files Browse the repository at this point in the history
  • Loading branch information
artem-hexagon committed Apr 15, 2024
1 parent bd6b446 commit 65396f0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cdt_bindings_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

def test_constants() -> None:
"""Test that constants have proper values"""
assert cdt.NO_NEIGHBOR == np.iinfo(np.uint32).max, "NO_NEIGHBOR constant has wrong value"
assert cdt.NO_VERTEX == np.iinfo(np.uint32).max, "NO_VERTEX constant has wrong value"
assert cdt.NO_NEIGHBOR == np.iinfo(np.uintc).max, "NO_NEIGHBOR constant has wrong value"
assert cdt.NO_VERTEX == np.iinfo(np.uintc).max, "NO_VERTEX constant has wrong value"


def test_V2d() -> None:
Expand All @@ -38,7 +38,7 @@ def test_Edge() -> None:
assert e.v1 == 1 and e.v2 == 2, "Constructed wrong edge"
e = cdt.Edge(2, 1)
assert e.v1 == 1 and e.v2 == 2, "Constructed wrong edge"
e = cdt.Edge(np.array([2, 1], dtype=np.uint32))
e = cdt.Edge(np.array([2, 1], dtype=np.uintc))
assert e.v1 == 1 and e.v2 == 2, "Constructed wrong edge"

assert cdt.Edge(1, 2).__repr__() == "Edge(1, 2)", "Wrong __repr__ output for Edge"
Expand Down Expand Up @@ -165,8 +165,8 @@ def test_insert_vertices(vv) -> None:


@pytest.mark.parametrize("ee", [[cdt.Edge(0, 1), cdt.Edge(2, 3), cdt.Edge(3, 4), cdt.Edge(5, 6)],
np.array([[0, 1], [2, 3], [3, 4], [5, 6]], dtype=np.uint32),
np.array([0, 1, 2, 3, 3, 4, 5, 6], dtype=np.uint32)])
np.array([[0, 1], [2, 3], [3, 4], [5, 6]], dtype=np.uintc),
np.array([0, 1, 2, 3, 3, 4, 5, 6], dtype=np.uintc)])
def test_insert_conform_edges(ee) -> None:
# insert edges
t = cdt.Triangulation(cdt.VertexInsertionOrder.AS_PROVIDED, cdt.IntersectingConstraintEdges.NOT_ALLOWED, 0.0)
Expand Down

0 comments on commit 65396f0

Please sign in to comment.