Verifying Simulation Assets#
This document explains how to run tests for the simulation-ready assets in Infinigen via pytest.
Running Tests#
Tests are run using pytest:
# Run all tests for all assets
pytest tests/infinigen/sim
# Run all tests for particular asset
pytest tests/infinigen/sim --asset {asset name}
# Run specific test file for all assets
pytest tests/infinigen/sim/test_blender_assets.py
Options#
Option |
Description |
|---|---|
|
Specify assets to test (e.g., |
|
Number of seeds to test per asset. Default: 10 |
Note: If you are contributing a new simulation-ready asset, ensure that all tests are successful for your asset for 10 seeds (i.e. make sure to include --nr 10 in your command).
Additional Examples#
# Run all tests for door
pytest tests/infinigen/sim --asset door
# Run all tests for door using 10 different seeds per test
pytest tests/infinigen/sim --asset door --nr 10
# Check vertex count for all assets. Will check seeds 0 through 4 for all assets.
pytest tests/infinigen/sim/test_blender_assets.py::TestBlenderAssets::test_asset_vertex_count
# Check vertex count for door and drawer. Check for 10 different seeds (0 through 9).
pytest tests/infinigen/sim/test_blender_assets.py::TestBlenderAssets::test_asset_vertex_count --asset door drawer --nr 10