Skip to content

Latest commit

 

History

History
22 lines (13 loc) · 1006 Bytes

File metadata and controls

22 lines (13 loc) · 1006 Bytes

trimesh: OBJ/MTL Optional Property Round-Trips

Upstream PR: mikedh/trimesh#2557

Bug

OBJ/MTL optional material properties needed round-trip coverage through a zipped resolver path. The test initially stored exported OBJ text in ZipResolver as a string, which conflicted with the resolver's bytes return annotation under pytest-beartype.

Contract

Resolver storage and retrieval should keep byte-oriented data as bytes. Tests for material round-trips should validate optional property preservation without weakening type checks.

Fix

The exported OBJ text is encoded before being stored in ZipResolver, aligning the test with the resolver contract while preserving the material-property round-trip assertions.

Verification

  • Focused round-trip test under pytest-beartype -> 1 passed
  • Related OBJ tests -> 3 passed
  • Full tests/test_obj.py with optional dependencies -> 41 passed
  • ruff check and git diff --check -> passed