Ask Your Question
1

colcon test failed in python package

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

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 test@user.com --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 ===============================
/usr/lib/python3/dist-packages/pydocstyle/config.py:6
  Warning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.9 it will stop working


-- Docs: https://docs.pytest.org/en/latest/warnings.html
---
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
2

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

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 (https://packages.ubuntu.com/focal/pyd...) 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

Comments

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 -0500 )edit

Depending on what you are looking for there are https://colcon.readthedocs.io/ as well as https://index.ros.org/doc/ros2/Tutori...

Dirk Thomas gravatar image Dirk Thomas  ( 2020-06-26 12:11:52 -0500 )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

2 followers

Stats

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

Seen: 244 times

Last updated: Jun 24 '20