diff --git a/Unittests/test_read_write_obj.py b/Unittests/test_read_write_obj.py index da2bfa418e4dd0a2aa8478320c2bfc3184363b0e..cbd8b6bb60071ebc7af2298a6b13cb6cb55de794 100644 --- a/Unittests/test_read_write_obj.py +++ b/Unittests/test_read_write_obj.py @@ -7,7 +7,7 @@ class ReadWriteOBJ(unittest.TestCase): self.mesh = openmesh.TriMesh() def test_load_simple_obj(self): - ok = openmesh.read_mesh(self.mesh, "cube-minimal.obj") + ok = openmesh.read_mesh(self.mesh, "TestFiles/cube-minimal.obj") self.assertTrue(ok) @@ -22,7 +22,7 @@ class ReadWriteOBJ(unittest.TestCase): options = openmesh.Options() options += openmesh.Options.VertexNormal - file_name = "cube-minimal.obj" + file_name = "TestFiles/cube-minimal.obj" ok = openmesh.read_mesh(self.mesh, file_name, options) @@ -87,7 +87,7 @@ class ReadWriteOBJ(unittest.TestCase): def test_load_simple_obj_force_vertex_colors_although_not_available(self): self.mesh.request_vertex_colors() - file_name = "cube-minimal.obj" + file_name = "TestFiles/cube-minimal.obj" options = openmesh.Options() options += openmesh.Options.VertexColor @@ -107,7 +107,7 @@ class ReadWriteOBJ(unittest.TestCase): options = openmesh.Options() options += openmesh.Options.FaceTexCoord - file_name = "cube-minimal-texCoords.obj" + file_name = "TestFiles/cube-minimal-texCoords.obj" ok = openmesh.read_mesh(self.mesh, file_name, options) @@ -139,7 +139,7 @@ class ReadWriteOBJ(unittest.TestCase): options = openmesh.Options() options += openmesh.Options.FaceColor - file_name = "square_material.obj" + file_name = "TestFiles/square_material.obj" ok = openmesh.read_mesh(self.mesh, file_name, options) @@ -161,7 +161,7 @@ class ReadWriteOBJ(unittest.TestCase): options = openmesh.Options() options += openmesh.Options.VertexColor - file_name = "cube-minimal-vertex-colors-after-vertex-definition.obj" + file_name = "TestFiles/cube-minimal-vertex-colors-after-vertex-definition.obj" ok = openmesh.read_mesh(self.mesh, file_name, options) @@ -195,7 +195,7 @@ class ReadWriteOBJ(unittest.TestCase): options = openmesh.Options() options += openmesh.Options.VertexColor - file_name = "cube-minimal-vertex-colors-as-vc-lines.obj" + file_name = "TestFiles/cube-minimal-vertex-colors-as-vc-lines.obj" ok = openmesh.read_mesh(self.mesh, file_name, options) diff --git a/Unittests/test_read_write_off.py b/Unittests/test_read_write_off.py index a2d50b05b0a8a2b302608e4a8407d53320baf5a1..fb78116e5a918321738585ec60694dbf231d2e5e 100644 --- a/Unittests/test_read_write_off.py +++ b/Unittests/test_read_write_off.py @@ -7,7 +7,7 @@ class ReadWriteOFF(unittest.TestCase): self.mesh = openmesh.TriMesh() def test_load_simple_off_file(self): - ok = openmesh.read_mesh(self.mesh, "cube1.off") + ok = openmesh.read_mesh(self.mesh, "TestFiles/cube1.off") self.assertTrue(ok) @@ -43,8 +43,8 @@ class ReadWriteOFF(unittest.TestCase): options += openmesh.Options.VertexColor options += openmesh.Options.ColorFloat - openmesh.write_mesh(self.mesh, "temp.off", options) - openmesh.read_mesh(self.mesh, "temp.off", options) + openmesh.write_mesh(self.mesh, "TestFiles/temp.off", options) + openmesh.read_mesh(self.mesh, "TestFiles/temp.off", options) # Check if vertices still have the same color count = 0 @@ -62,7 +62,7 @@ class ReadWriteOFF(unittest.TestCase): options = openmesh.Options(openmesh.Options.VertexColor) - ok = openmesh.read_mesh(self.mesh, "meshlab.ply", options) + ok = openmesh.read_mesh(self.mesh, "TestFiles/meshlab.ply", options) self.assertTrue(ok) @@ -71,9 +71,9 @@ class ReadWriteOFF(unittest.TestCase): options += openmesh.Options.ColorFloat # Write the mesh - ok = openmesh.write_mesh(self.mesh, "cube_floating.off", options) + ok = openmesh.write_mesh(self.mesh, "TestFiles/cube_floating.off", options) self.assertTrue(ok) - ok = openmesh.read_mesh(self.mesh, "cube_floating.off", options) + ok = openmesh.read_mesh(self.mesh, "TestFiles/cube_floating.off", options) self.assertTrue(ok) self.assertEqual(self.mesh.n_vertices(), 8) @@ -108,7 +108,7 @@ class ReadWriteOFF(unittest.TestCase): options = openmesh.Options(openmesh.Options.VertexColor) - ok = openmesh.read_mesh(self.mesh, "meshlab.ply", options) + ok = openmesh.read_mesh(self.mesh, "TestFiles/meshlab.ply", options) self.assertTrue(ok) @@ -118,14 +118,14 @@ class ReadWriteOFF(unittest.TestCase): options += openmesh.Options.ColorFloat # Write the mesh - ok = openmesh.write_mesh(self.mesh, "cube_floating_binary.off", options) + ok = openmesh.write_mesh(self.mesh, "TestFiles/cube_floating_binary.off", options) self.assertTrue(ok) self.mesh.clear() options.clear() options += openmesh.Options.VertexColor options += openmesh.Options.Binary options += openmesh.Options.ColorFloat - ok = openmesh.read_mesh(self.mesh, "cube_floating_binary.off", options) + ok = openmesh.read_mesh(self.mesh, "TestFiles/cube_floating_binary.off", options) self.assertTrue(ok) self.assertEqual(self.mesh.n_vertices(), 8) diff --git a/Unittests/test_read_write_om.py b/Unittests/test_read_write_om.py index dc8887ecc833c9796a3db49e81769b74475eb606..b83b7d90ca9096886feb80db5eedf5a4b8d8ec56 100644 --- a/Unittests/test_read_write_om.py +++ b/Unittests/test_read_write_om.py @@ -10,7 +10,7 @@ class ReadWriteOM(unittest.TestCase): def test_load_simple_om_force_vertex_colors_although_not_available(self): self.mesh.request_vertex_colors() - file_name = "cube-minimal.om" + file_name = "TestFiles/cube-minimal.om" options = openmesh.Options() options += openmesh.Options.VertexColor @@ -34,7 +34,7 @@ class ReadWriteOM(unittest.TestCase): options = openmesh.Options() options += openmesh.Options.VertexTexCoord - ok = openmesh.read_mesh(self.mesh, "cube-minimal-texCoords.om", options) + ok = openmesh.read_mesh(self.mesh, "TestFiles/cube-minimal-texCoords.om", options) self.assertTrue(ok) @@ -66,7 +66,7 @@ class ReadWriteOM(unittest.TestCase): options = openmesh.Options() options += openmesh.Options.VertexColor - ok = openmesh.read_mesh(self.mesh, "cube-minimal-vertexColors.om", options) + ok = openmesh.read_mesh(self.mesh, "TestFiles/cube-minimal-vertexColors.om", options) self.assertTrue(ok) @@ -97,7 +97,7 @@ class ReadWriteOM(unittest.TestCase): self.mesh.release_vertex_colors() def test_write_triangle(self): - filename = "triangle-minimal.om"; + filename = "TestFiles/triangle-minimal.om"; # Generate data v1 = self.mesh.add_vertex(openmesh.Vec3d(1.0, 0.0, 0.0)) @@ -135,7 +135,7 @@ class ReadWriteOM(unittest.TestCase): options += openmesh.Options.VertexColor options += openmesh.Options.ColorFloat - filename = "triangle-minimal-ColorsPerVertex.om" + filename = "TestFiles/triangle-minimal-ColorsPerVertex.om" # Generate data v1 = self.mesh.add_vertex(openmesh.Vec3d(1.0, 0.0, 0.0)) diff --git a/Unittests/test_read_write_ply.py b/Unittests/test_read_write_ply.py index 7de00b1e5d709cd28e39dd4ba3f29746c58eed78..597e21b4526b6767c61897cfaf5381c08eed6f90 100644 --- a/Unittests/test_read_write_ply.py +++ b/Unittests/test_read_write_ply.py @@ -7,7 +7,7 @@ class ReadWritePLY(unittest.TestCase): self.mesh = openmesh.TriMesh() def test_load_simple_point_ply_file_with_bad_encoding(self): - ok = openmesh.read_mesh(self.mesh, "pointCloudBadEncoding.ply") + ok = openmesh.read_mesh(self.mesh, "TestFiles/pointCloudBadEncoding.ply") self.assertTrue(ok) @@ -16,7 +16,7 @@ class ReadWritePLY(unittest.TestCase): self.assertEqual(self.mesh.n_faces(), 0) def test_load_simple_point_ply_file_with_good_encoding(self): - ok = openmesh.read_mesh(self.mesh, "pointCloudGoodEncoding.ply") + ok = openmesh.read_mesh(self.mesh, "TestFiles/pointCloudGoodEncoding.ply") self.assertTrue(ok) @@ -25,7 +25,7 @@ class ReadWritePLY(unittest.TestCase): self.assertEqual(self.mesh.n_faces(), 0) def test_load_simple_ply(self): - ok = openmesh.read_mesh(self.mesh, "cube-minimal.ply") + ok = openmesh.read_mesh(self.mesh, "TestFiles/cube-minimal.ply") self.assertTrue(ok) @@ -36,7 +36,7 @@ class ReadWritePLY(unittest.TestCase): def test_load_simple_ply_force_vertex_colors_although_not_available(self): self.mesh.request_vertex_colors() - file_name = "cube-minimal.ply" + file_name = "TestFiles/cube-minimal.ply" options = openmesh.Options() options += openmesh.Options.VertexColor @@ -57,12 +57,12 @@ class ReadWritePLY(unittest.TestCase): def test_load_simple_ply_with_vertex_colors(self): self.mesh.request_vertex_colors() - file_name = "cube-minimal.ply" + file_name = "TestFiles/cube-minimal.ply" options = openmesh.Options() options += openmesh.Options.VertexColor - ok = openmesh.read_mesh(self.mesh, "cube-minimal-vertexColors.ply", options) + ok = openmesh.read_mesh(self.mesh, "TestFiles/cube-minimal-vertexColors.ply", options) self.assertTrue(ok) @@ -98,7 +98,7 @@ class ReadWritePLY(unittest.TestCase): options = openmesh.Options() options += openmesh.Options.VertexColor - ok = openmesh.read_mesh(self.mesh, "meshlab.ply", options) + ok = openmesh.read_mesh(self.mesh, "TestFiles/meshlab.ply", options) self.assertTrue(ok) @@ -134,18 +134,18 @@ class ReadWritePLY(unittest.TestCase): options = openmesh.Options() options += openmesh.Options.VertexColor - ok = openmesh.read_mesh(self.mesh, "meshlab.ply", options) + ok = openmesh.read_mesh(self.mesh, "TestFiles/meshlab.ply", options) self.assertTrue(ok) options += openmesh.Options.Binary - ok = openmesh.write_mesh(self.mesh, "meshlab_binary.ply", options) + ok = openmesh.write_mesh(self.mesh, "TestFiles/meshlab_binary.ply", options) self.assertTrue(ok) self.mesh.clear - ok = openmesh.read_mesh(self.mesh, "meshlab_binary.ply", options) + ok = openmesh.read_mesh(self.mesh, "TestFiles/meshlab_binary.ply", options) self.assertTrue(ok) self.assertEqual(self.mesh.n_vertices(), 8) @@ -180,17 +180,17 @@ class ReadWritePLY(unittest.TestCase): options = openmesh.Options() options += openmesh.Options.VertexColor - ok = openmesh.read_mesh(self.mesh, "meshlab.ply", options) + ok = openmesh.read_mesh(self.mesh, "TestFiles/meshlab.ply", options) self.assertTrue(ok) options += openmesh.Options.ColorFloat - ok = openmesh.write_mesh(self.mesh, "meshlab_float.ply", options) + ok = openmesh.write_mesh(self.mesh, "TestFiles/meshlab_float.ply", options) self.assertTrue(ok) self.mesh.clear - ok = openmesh.read_mesh(self.mesh, "meshlab_float.ply", options) + ok = openmesh.read_mesh(self.mesh, "TestFiles/meshlab_float.ply", options) self.assertTrue(ok) self.assertEqual(self.mesh.n_vertices(), 8) @@ -226,18 +226,18 @@ class ReadWritePLY(unittest.TestCase): options = openmesh.Options() options += openmesh.Options.VertexColor - ok = openmesh.read_mesh(self.mesh, "meshlab.ply", options) + ok = openmesh.read_mesh(self.mesh, "TestFiles/meshlab.ply", options) self.assertTrue(ok) options += openmesh.Options.ColorFloat options += openmesh.Options.Binary - ok = openmesh.write_mesh(self.mesh, "meshlab_binary_float.ply", options) + ok = openmesh.write_mesh(self.mesh, "TestFiles/meshlab_binary_float.ply", options) self.assertTrue(ok) self.mesh.clear - ok = openmesh.read_mesh(self.mesh, "meshlab_binary_float.ply", options) + ok = openmesh.read_mesh(self.mesh, "TestFiles/meshlab_binary_float.ply", options) self.assertTrue(ok) self.assertEqual(self.mesh.n_vertices(), 8) @@ -274,7 +274,7 @@ class ReadWritePLY(unittest.TestCase): options = openmesh.Options() options += openmesh.Options.VertexTexCoord - ok = openmesh.read_mesh(self.mesh, "cube-minimal-texCoords.ply", options) + ok = openmesh.read_mesh(self.mesh, "TestFiles/cube-minimal-texCoords.ply", options) self.assertTrue(ok) @@ -306,7 +306,7 @@ class ReadWritePLY(unittest.TestCase): options = openmesh.Options() options += openmesh.Options.VertexNormal - ok = openmesh.read_mesh(self.mesh, "cube-minimal-normals.ply", options) + ok = openmesh.read_mesh(self.mesh, "TestFiles/cube-minimal-normals.ply", options) self.assertTrue(ok) diff --git a/Unittests/test_read_write_stl.py b/Unittests/test_read_write_stl.py index b2ede2e020a36b7f068328ab82a52d80d930da11..64de9a3f44ed2e31d40f447c05f68a0781e9d684 100644 --- a/Unittests/test_read_write_stl.py +++ b/Unittests/test_read_write_stl.py @@ -7,7 +7,7 @@ class ReadWriteSTL(unittest.TestCase): self.mesh = openmesh.TriMesh() def test_load_simple_stl_file(self): - ok = openmesh.read_mesh(self.mesh, "cube1.stl") + ok = openmesh.read_mesh(self.mesh, "TestFiles/cube1.stl") self.assertTrue(ok) @@ -21,7 +21,7 @@ class ReadWriteSTL(unittest.TestCase): options = openmesh.Options() options += openmesh.Options.FaceNormal - ok = openmesh.read_mesh(self.mesh, "cube1.stl", options) + ok = openmesh.read_mesh(self.mesh, "TestFiles/cube1.stl", options) self.assertTrue(ok) @@ -36,7 +36,7 @@ class ReadWriteSTL(unittest.TestCase): self.mesh.release_face_normals() def test_load_simple_stl_binary_file(self): - ok = openmesh.read_mesh(self.mesh, "cube1Binary.stl") + ok = openmesh.read_mesh(self.mesh, "TestFiles/cube1Binary.stl") self.assertTrue(ok) @@ -51,7 +51,7 @@ class ReadWriteSTL(unittest.TestCase): options += openmesh.Options.FaceNormal options += openmesh.Options.Binary - ok = openmesh.read_mesh(self.mesh, "cube1Binary.stl", options) + ok = openmesh.read_mesh(self.mesh, "TestFiles/cube1Binary.stl", options) self.assertTrue(ok)