A unit test checks an individual function or rule in isolation. A failure should help identify the particular behavior that is wrong.
These tests import WAutoSim's pure-Python packages (wauto_sim_geo,
wauto_sim_config) and need no simulator, ROS, or Chrono. If a package is not
importable, its tests are skipped with a reason.
| File | Checks |
|---|---|
test_detection_gate.py |
Mock-perception detection rules: objects ahead are detected at the right vehicle-frame position; objects behind, out of range, too close, outside the field of view, or facing away are not. |
test_topics_and_fixtures.py |
~/ topic names resolve under the Chrono ROS node; sensor message types and ground-truth defaults match what the integration tests listen for; every scene in fixtures validates and runs headless. |
The packages need pydantic, PyYAML, and numpy, plus the WAutoSim sources on
PYTHONPATH. From the CI-CD-Infrastructure folder, with WAutoSim checked out
next to it:
.\.venv\Scripts\python.exe -m pip install -r requirements-test.txt pydantic PyYAML numpy
$env:PYTHONPATH = "..\WAutoSim\wauto_sim_geo\src;..\WAutoSim\wauto_sim_config\src"
.\.venv\Scripts\python.exe -m pytestHow tests should find WAutoSim in the long run (path variable, installed
package, or something else) is not decided yet; PYTHONPATH matches what the
Docker launcher already does. The Docker launcher runs these tests too.
See the test guide for placement and documentation guidance.