MCPcopy
hub / github.com/huggingface/datasets / test_mesh_feature_encode_trimesh_object

Function test_mesh_feature_encode_trimesh_object

tests/features/test_mesh.py:133–142  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

131
132@require_trimesh
133def test_mesh_feature_encode_trimesh_object():
134 import trimesh
135
136 mesh = trimesh.creation.box()
137 encoded_example = Mesh().encode_example(mesh)
138 assert encoded_example.keys() == {"bytes", "path"}
139 assert encoded_example["path"] == "mesh.glb"
140 assert encoded_example["bytes"] is not None
141 decoded_example = Mesh().decode_example(encoded_example)
142 assert isinstance(decoded_example, trimesh.Scene)
143
144
145def test_require_decoding():

Callers

nothing calls this directly

Calls 3

MeshClass · 0.90
encode_exampleMethod · 0.45
decode_exampleMethod · 0.45

Tested by

no test coverage detected