Table Of Contents

Previous topic

Configuring gtest for C++

Next topic

Configuring rostest

This Page

Configuring Python nose tests

Nosetest is the framework for running Python unit tests. No ROS environment is available. See: Configuring rostest if your tests need a running roscore.

package.xml

The unittest package is needed for testing:

<test_depend>unittest</test_depend>

CMakeLists.txt

Declare each nose test like this:

if (CATKIN_ENABLE_TESTING)
  catkin_add_nosetests(test_your_node tests/test_your_node.py)
endif()

This example assumes your tests are defined in the tests/ subdirectory in your source tree.