This directory contains plain Python unit tests for script logic that can run outside Blender.
Current scope:
test_untoldexplorer.py: coverage for Blender-free helpers inscripts/untoldexplorer.py— packing, binary serialization, record sizes, matrix math, AABB helpers, argument parsing, andmain()input validation.test_tilestreamingpartition.py: coverage for Blender-free helpers inscripts/tilestreamingpartition.py— tile coordinate math, overlap queries, tile bounds, coordinate space conversion, mesh classification, output helpers, and argument parsing.bpy/bmesh/mathutilsare stubbed withMagicMockso these tests run without Blender installed.test_addon_bridge.py: what the Blender add-on does with the result of an export (untold-blender-addon/untold_exporter/bridge.py): which files its texture bake bakes and patches.bpyis stubbed while the bridge loads, and the files are written by the exporter's own writers.
Run locally from the repo root:
make testexporterDirect unittest invocation:
python3 -m unittest discover -s scripts/tests -t . -vNotes:
- These tests intentionally avoid Blender-only paths such as
bpyscene import, mesh extraction, and USD export. - If future tests need Blender, keep them separate from this suite so
make testexporterstays fast and CI-friendly.
blender/ holds checks that only a real Blender can run. They are not part of
make testexporter and do not run in CI. Each one makes its own images in a
temporary folder.
blender/texture_write_checks.py: writing textures throughwrite_blender_image_to_path, including a JPEG whose metadata makes Blender's PNG writer fail.
Run from the repo root:
blender --background --factory-startup --python-exit-code 1 --python scripts/tests/blender/texture_write_checks.py