Ask Your Question

colcon test failed in python package

asked 2020-06-24 01:55:18 -0600

lmiller gravatar image

i want do create some tests for my ROS packages. So i started with an example package to begin. I've created a python package with following command:

ros2 pkg create --build-type ament_python --maintainer-name "test user" --maintainer-email --license "Apache License 2.0" --description "This is a simple test example" test_package

then I build the package with colcon:

colcon build --packages-select test_package && source install/setup.zsh

I startet the test cases over the colcon test command for my package with:

colcon test --packages-select test_package

As output i get:

Starting >>> test_package
--- stderr: test_package                   

=============================== warnings summary ===============================
  Warning: Using or importing the ABCs from 'collections' instead of from '' is deprecated since Python 3.3, and in 3.9 it will stop working

-- Docs:
Finished <<< test_package [1.07s]

Summary: 1 package finished [1.28s]
  1 package had stderr output: test_package

Why are the standard test fails? Did i do something wrong? I thought it would still work for a few weeks without any warnings I'm working on Foxy and Ubuntu 20.04

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-06-24 10:44:20 -0600

Dirk Thomas gravatar image

The test invocation did not fail. There are no test failures. You can check the results using colcon test-result --all.

What you are seeing is a Python warning coming from the pydocstylepackage. The Debian package provided by Ubuntu ( version 2.1.1-1 doesn't contain newer fixes from upstream.

You could install a newer version via pip install --upgrade pydocstyle but that comes with the downside that the pip-installed version won't be updated automatically (by apt) and will overlay potential newer Debian packages released in the future.

edit flag offensive delete link more


Thanks for your answer. is there already a tutorial or example package that gives me some overview?

lmiller gravatar image lmiller  ( 2020-06-25 00:09:24 -0600 )edit

Depending on what you are looking for there are as well as

Dirk Thomas gravatar image Dirk Thomas  ( 2020-06-26 12:11:52 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2020-06-24 01:55:18 -0600

Seen: 496 times

Last updated: Jun 24 '20