You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3e4e726
Browse filesBrowse the repository at this point in the historyBrowse files
For `rclpy.node.Node` subclasses use a real dummy base class instead of a
147
147
`MagicMock()` to ensure `__init_subclass__` fires and method bodies are defined
148
-
(see `test_natnet_ros2.py`for the full pattern).
148
+
(the asm_optitrack module's `test_natnet_ros2.py`shows the full pattern).
149
149
150
150
### 3. Register the package in colcon_unit_test_packages.yaml
151
151
@@ -155,7 +155,6 @@ If the package isn't already listed, add it under the `robot` workspace in
155
155
```yaml
156
156
robot:
157
157
packages:
158
-
- natnet_ros2
159
158
- lidar_point_cloud_filter
160
159
- <your_package> # ← add here
161
160
pytest_args: []
@@ -282,17 +281,18 @@ sim:
282
281
| How do I run them? | `airstack test -m unit`, `cd tests && pytest -m unit`, or `pytest tests/ -m unit` |
283
282
| What CI workflow runs them? | Python: `unit-tests.yml`; C++: the `build_packages` path in `system-tests.yml` — see §5 |
284
283
| Do system tests (`liveliness`, etc.) run too? | No — `-m unit` filters to hermetic tests only |
285
-
| Does `colcon test` also run these? | Only if the package registers them. `ament_add_gtest` covers C++; a Python test needs `ament_add_pytest_test`, which `natnet_ros2` does **not** have — its Python tests run only under the root harness |
284
+
| Does `colcon test` also run these? | Only if the package registers them. `ament_add_gtest` covers C++; a Python test in an `ament_cmake` package needs `ament_add_pytest_test` — without it, its Python tests run only under the root harness |
286
285
| Can I add pure C++ gtests? | Yes — `ament_add_gtest` in CMakeLists.txt |
0 commit comments