From 0169c0349cdb785391160b16aadf6cac4dc957f3 Mon Sep 17 00:00:00 2001 From: Brian Pugh Date: Mon, 19 Aug 2019 14:52:43 -0700 Subject: [PATCH] Added test for vertex_index --- tests/data/diamond_ascii_vertex_index.ply | 31 +++++++++++++++++++++++ tests/integration/io/test_from_file.py | 1 + 2 files changed, 32 insertions(+) create mode 100644 tests/data/diamond_ascii_vertex_index.ply diff --git a/tests/data/diamond_ascii_vertex_index.ply b/tests/data/diamond_ascii_vertex_index.ply new file mode 100644 index 0000000..fde2d75 --- /dev/null +++ b/tests/data/diamond_ascii_vertex_index.ply @@ -0,0 +1,31 @@ +ply +format ascii 1.0 +comment VCGLIB generated +element vertex 6 +property float x +property float y +property float z +property float nx +property float ny +property float nz +property uchar red +property uchar green +property uchar blue +property uchar alpha +element face 8 +property list uchar int vertex_index +end_header +0.5 0 0.5 0 -1 0 255 0 0 255 +0 0.5 0.5 -1 0 0 255 0 0 255 +0.5 0.5 0 0 0 -1 0 255 0 255 +1 0.5 0.5 1 0 0 255 0 0 255 +0.5 1 0.5 0 1 0 255 0 0 255 +0.5 0.5 1 0 0 1 0 0 255 255 +3 0 1 2 +3 0 3 2 +3 3 4 2 +3 4 1 2 +3 0 1 5 +3 0 3 5 +3 3 4 5 +3 4 1 5 diff --git a/tests/integration/io/test_from_file.py b/tests/integration/io/test_from_file.py index 3393f64..1b1fd24 100644 --- a/tests/integration/io/test_from_file.py +++ b/tests/integration/io/test_from_file.py @@ -38,6 +38,7 @@ def assert_mesh(data): @pytest.mark.parametrize("extension,color,mesh", [ (".ply", True, True), ("_ascii.ply", True, True), + ("_ascii_vertex_index.ply", True, True), (".npz", True, True), (".obj", False, True), (".off", False, False),