unitrun(package,
test_name,
test,
sysargs=None,
coverage_packages=None)
| source code
|
Wrapper routine from running python unitttests with JUnit-compatible
XML output. This is meant for unittests that do not not need a running
ROS graph (i.e. offline tests only).
This enables JUnit-compatible test reporting so that test results can
be reported to higher-level tools.
WARNING: unitrun() will trigger a sys.exit() on test failure in order
to properly exit with an error code. This routine is meant to be used as
a main() routine, not as a library.
- Parameters:
package (str) - name of ROS package that is running the test
test (unittest.TestCase, or string) - a test case instance or a name resolving to a test case or suite
coverage_packages ([str]) - list of Python package to compute coverage results for. Defaults
to package
sysargs ([str]) - (optional) alternate sys.argv
|