Unit tests for ported datagen modules #6
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Write unit tests for all modules ported in #1-#5. Reuse the demo scenarios from the original
pebble-game.pyas test fixtures per the repository plan.Test files
tests/datagen/test_types.py— construction, serialization, enum valuestests/datagen/test_pebble_game.py— pebble game algorithm correctnesstests/datagen/test_jacobian.py— Jacobian construction and rank computationtests/datagen/test_analysis.py— combined analysis functiontests/datagen/test_generator.py— synthetic assembly generationTest scenarios (from demo, L1283-1442)
Additional tests
JointTypeenum has correct DOF valuePebbleGame3D: single body has 6 free pebbles, adding bodies is idempotentPebbleGame3D: all joint types expand to correct number of multigraph edgesJacobianVerifier: each joint builder produces correct number of rowsJacobianVerifier: Jacobian shape is (n_constraints, 6*n_bodies)JacobianVerifier:find_dependencies()returns subset of row indicesanalyze_assembly: grounded vs ungrounded DOF accountingSyntheticAssemblyGenerator: chain is never rigid, rigid assembly is rigid, overconstrained has redundant > 0Depends on