-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NO TESTS RAN failure on Noble for an ament_python package #678
Comments
Hi there. There are two strategies that colcon uses to test Python packages. The default is to directly invoke the So your package uses I'm open to suggestions here, but I'm guessing that from your perspective you'd like the pre-3.12 behavior of "no error" when there were no tests. Is that correct? |
Oh, good digging. Thanks. I was barking up the colcon/pytest tree.
Is it defaulting to that? I don't specify it anywhere.
I'm not sure yet. It would be reasonable to expect that if no test configuration is provided, no tests are run. However, this is all against my usual bias for requiring tests everywhere. Might be worth just activating the pytests that are there and see if the extra configuration is tolerable. Let me explore for a bit. |
That's correct. That was chosen as the default likely because it's built into Python's standard library and will reliably be available. For a low-effort fix, it might be good to add a super simple unittest-compatible import check. Very high bang-for-your-buck minimal test. import unittest
class ImportTest(unittest.TestCase):
def test_import(self):
import py_trees # noqa: F401 |
Aye, was thinking along those lines too. Thanks! |
I came across this issue too and while upgrading our code to ros jazzy (and ubuntu 24.04 / python 3.12). While adding an empty test case is a quick fix, I don't think that when running tests for a whole code base of a multitude of packages and there are some, that do not have any test cases it should fail the whole test run. Or at least I think, that there should be an option e.g. by passing |
This is a little tricky from my perspective.
That said, much of colcon's value comes from providing a cohesive experience across various build (and test) systems, and it appears that this may be a deviation for Implicitly converting exit code 5 to 0 for |
to ensure that the CI `colcon test` run works, because with a change to python 3.12 the `unittest` standard library used by default with colcon now exits with an error code of 5 for an empty test suite. See: colcon/colcon-core#678 See: python/cpython#102051
to ensure that the CI `colcon test` run works, because with a change to python 3.12 the `unittest` standard library used by default with colcon now exits with an error code of 5 for an empty test suite. Additionally removed old ros 1 integration tests. See: colcon/colcon-core#678 See: python/cpython#102051
to ensure that the CI `colcon test` run works, because with a change to python 3.12 the `unittest` standard library used by default with colcon now exits with an error code of 5 for an empty test suite. See: colcon/colcon-core#678 See: python/cpython#102051
to ensure that the CI `colcon test` run works, because with a change to python 3.12 the `unittest` standard library used by default with colcon now exits with an error code of 5 for an empty test suite. Additionally removed old ros 1 integration tests. See: colcon/colcon-core#678 See: python/cpython#102051
Hi all,
I'm seeing a difference in behavior between Iron and Jammy for ROS PR jobs using ament_python.
Ran 0 tests
NO TESTS RAN
Tests are covered by github actions, so I've been leaving them out on the ROS PR Job (which serves mainly to smoke test deb builds). Has there been a toggle in colcon or the underlying tools in Noble that now require them?
I'm actually surprised it's doing anything here at all since there is no callout to pytest in [setup.py].
The text was updated successfully, but these errors were encountered: