@@ -0,0 +1,1349 @@
+import pytest%0A%0Aimport compas%0A%0Afrom compas.datastructures import Mesh%0Afrom compas.datastructures import mesh_insert_vertex_on_edge%0Afrom compas.datastructures import mesh_substitute_vertex_in_faces%0A%0A%0A@pytest.fixture%0Adef mesh_0():%0A    vertices = %5B%0A        %5B1.0, 0.0, 0.0%5D, %0A        %5B1.0, 2.0, 0.0%5D,%0A        %5B0.0, 1.0, 0.0%5D,%0A        %5B2.0, 1.0, 0.0%5D,%0A        %5B0.0, 0.0, 0.0%5D,%0A    %5D%0A    faces = %5B%0A        %5B0, 1, 2%5D,%0A        %5B0, 3, 2%5D%0A    %5D%0A    %0A    return Mesh.from_vertices_and_faces(vertices, faces)%0A%0A%0Adef test__insert_vertex_on_edge(mesh_0):%0A    mesh_insert_vertex_on_edge(mesh_0, 0, 1)%0A    assert mesh.face_degree(0) == 4%0A    assert mesh.face_degree(0) == 4%0A    assert mesh.face_vertex_descendant(0, 0) == 5%0A    assert mesh.face_vertex_descendant(1, 1) == 5%0A%0A    mesh_insert_vertex_on_edge(mesh_0, 0, 2, 4)%0A    assert mesh.face_degree(0) == 5%0A    assert mesh.face_vertex_descendant(0, 2) == 4%0A%0A%0Adef test_mesh_substitute_vertex_in_faces(mesh_0):%0A    mesh_substitute_vertex_in_faces(0, 4)%0A    assert 4 in mesh.face_vertices(0)%0A    assert 0 not in mesh.face_vertices(0)%0A    assert 4 in mesh.face_vertices(1)%0A    assert 0 not in mesh.face_vertices(1)%0A    mesh_substitute_vertex_in_faces(4, 0, 1)%0A    assert 4 in mesh.face_vertices(0)%0A    assert 0 not in mesh.face_vertices(0)%0A    assert 0 in mesh.face_vertices(1)%0A    assert 4 not in mesh.face_vertices(1)

test for mesh operations