MCPcopy Create free account
hub / github.com/PyMesh/PyMesh / test_anonymous

Method test_anonymous

python/pymesh/tests/test_meshio.py:57–74  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

55 self.assert_mesh_equal(mesh, mesh3, attr_names=["vertex_index"])
56
57 def test_anonymous(self):
58 vertices = np.array([
59 [0.0, 0.0, 0.0],
60 [1.0, 0.0, 0.0],
61 [0.0, 1.0, 0.0],
62 ])
63 faces = np.array([[0, 1, 2]])
64 mesh = form_mesh(vertices, faces)
65
66 for ext in [".msh", ".obj", ".ply", ".mesh", ".off"]:
67 mesh1 = self.write_and_load(mesh,
68 "anonymous_test{}".format(ext), use_ascii=True,
69 anonymous=True)
70 self.assert_mesh_equal(mesh, mesh1)
71 mesh2 = self.write_and_load(mesh,
72 "anonymous_test{}".format(ext), use_ascii=False,
73 anonymous=True)
74 self.assert_mesh_equal(mesh, mesh2)
75

Callers

nothing calls this directly

Calls 3

write_and_loadMethod · 0.95
form_meshFunction · 0.90
assert_mesh_equalMethod · 0.80

Tested by

no test coverage detected