Skip to content

tests supposed to run with pytest shouldn't fall back to unittest in case of problems #321

@rotu

Description

@rotu

http://build.ros2.org/view/Fci/job/Fci__nightly-cyclonedds_ubuntu_focal_amd64/40/consoleText

Although the underlying issue was fixed in #317, colcon test incorrectly reported that testing completed successfully and was not flagged on CI.

Starting >>> rqt
[967.160s] ERROR:colcon.colcon_core.task.python.test:Exception in Python testing step extension 'pytest': 'NoneType' object is not iterable
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/colcon_core/task/python/test/__init__.py", line 54, in test
    matched = extension.match(self.context, env, setup_py_data)
  File "/usr/lib/python3/dist-packages/colcon_core/task/python/test/pytest.py", line 49, in match
    return has_test_dependency(setup_py_data, 'pytest')
  File "/usr/lib/python3/dist-packages/colcon_core/task/python/test/__init__.py", line 214, in has_test_dependency
    for d in tests_require:
TypeError: 'NoneType' object is not iterable


----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK
--- stderr: rqt

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions