[ros-users] [Discourse.ros.org] [Quality Assurance] Pytest support for ROS / rostest

Dirk Thomas ros.discourse at gmail.com
Tue Jun 26 20:30:11 UTC 2018



I concur that `pytest` feels "easier" / more natural to use (obviously a subjective point). It certainly is more actively being developed and offers more features through the numerous available plugins. For ROS 2 we are using `pytest` over `nose` for a while for these reasons.

The new build tool [colcon](http://colcon.readthedocs.io) also invokes Python tests with `pytest`. Since `pytest` is capable of running tests written for `nose` this is usually compatible with exiting tests.

There are three parts to Python unit testing to consider:
* the API used to write unit tests
* the tool used to perform the testing of a package
* the tool used by `rostest` internally

I think the three parts are fairly independent from each other. E.g. using `colcon` you can run the tests of a ROS package with `pytest` even though they use `nose` / `unittest` API.





---
[Visit Topic](https://discourse.ros.org/t/pytest-support-for-ros-rostest/4990/6) or reply to this email to respond.




More information about the ros-users mailing list