Skip to content

Commit

Permalink
Change tests to consistently use data from the resources directory
Browse files Browse the repository at this point in the history
  • Loading branch information
dvicini committed Mar 14, 2023
1 parent 409bf8c commit 3d99c5f
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 33 deletions.
Empty file.
14 changes: 0 additions & 14 deletions src/emitters/tests/data/triangle.ply

This file was deleted.

2 changes: 1 addition & 1 deletion src/emitters/tests/test_area.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
def create_emitter_and_spectrum(s_key='d65'):
emitter = mi.load_dict({
"type": "ply",
"filename": "data/triangle.ply",
"filename": "resources/data/tests/ply/triangle.ply",
"emitter" : { "type": "area", "radiance" : spectrum_dicts[s_key] },
"to_world" : mi.ScalarTransform4f.translate([10, -1, 2])
})
Expand Down
2 changes: 1 addition & 1 deletion src/emitters/tests/test_directionalarea.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
def create_emitter_and_spectrum(s_key='d65'):
emitter = mi.load_dict({
"type": "ply",
"filename": "data/triangle.ply",
"filename": "resources/data/tests/ply/triangle.ply",
"emitter" : { "type": "directionalarea", "radiance" : spectrum_dicts[s_key] },
"to_world" : mi.ScalarTransform4f.translate([10, -1, 2])
})
Expand Down
14 changes: 0 additions & 14 deletions src/render/tests/data/triangle.ply

This file was deleted.

Binary file removed src/render/tests/data/triangle_face_colors.ply
Binary file not shown.
6 changes: 3 additions & 3 deletions src/render/tests/test_mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def test01_create_mesh(variant_scalar_rgb):
def test02_ply_triangle(variant_scalar_rgb):
m = mi.load_dict({
"type" : "ply",
"filename" : "data/triangle.ply",
"filename" : "resources/data/tests/ply/triangle.ply",
"face_normals" : True
})

Expand All @@ -59,7 +59,7 @@ def test03_ply_computed_normals(variant_scalar_rgb):
doesn't have them."""
shape = mi.load_dict({
"type" : "ply",
"filename" : "data/triangle.ply",
"filename" : "resources/data/tests/ply/triangle.ply",
})
params = mi.traverse(shape)
normals = params['vertex_normals']
Expand Down Expand Up @@ -168,7 +168,7 @@ def test():
def test07_ply_stored_attribute(variant_scalar_rgb):
m = mi.load_dict({
"type" : "ply",
"filename" : "data/triangle_face_colors.ply",
"filename" : "resources/data/tests/ply/triangle_face_colors.ply",
})

assert str(m) == """PLYMesh[
Expand Down

0 comments on commit 3d99c5f

Please sign in to comment.