Files
security-game/tools/tests/test_npc_proportions.py
zwitschi cd285b3a39
Full build / Import + headless tests (push) Successful in 41s
Full build / Full desktop build + optional release (push) Skipped
Ship the Quaternius npc_casual pilot base: rig-agnostic pose sync, five tint slots, unwrapped UVs and wrist-strap camera
2026-11-06 13:42:37 +01:00

33 lines
1.3 KiB
Python

import unittest
import npc_proportions
class NpcProportionTests(unittest.TestCase):
def test_every_library_character_is_measured(self):
rows = npc_proportions.report()
self.assertEqual(len(rows), 12)
self.assertEqual(len({row["character"] for row in rows}), 12)
for row in rows:
self.assertGreater(row["measurements"]["height"], 1.6)
self.assertIn(row["rig"], ("core", "quaternius"))
# Both rigs must resolve every measurement; a missing joint would
# collapse a ratio to zero.
for key, value in row["measurements"].items():
self.assertGreater(value, 0.0, f"{row['character']} {key}")
def test_current_library_stays_inside_the_stylized_guide(self):
for row in npc_proportions.report():
# ADR-0018: the Quaternius base is accepted at its upstream
# (semi-realistic) proportions, so the stylized band does not apply.
# The measurement stays in the report for the face/silhouette gate.
if row["rig"] != "core":
continue
for key, check in row["checks"].items():
self.assertEqual(check["status"], "ok",
f"{row['character']} {key}={check['value']}")
if __name__ == "__main__":
unittest.main()