fix: repair the test suite on main - #2289
Open
abendrothj wants to merge 1 commit into
Open
Conversation
Two unrelated breakages stop `uv run pytest` before it runs anything: - src/exo/download/ has no __init__.py, so pytest derives the module name 'tests.test_*' for everything under it and the top-level tests/ package shadows it. Eight files fail to import and collection aborts. - test_python.py still calls NetworkingHandle.new() with three arguments; the zenoh migration (exo-explore#2132) added the namespace parameter. Full suite goes from 8 collection errors to 471 passing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
uv run pytest— the command inCLAUDE.md's pre-commit checklist — does not currently run onmain. It aborts during collection:Two independent causes:
1.
src/exo/download/has no__init__.py. Every other test package in the tree has one. Without it, pytest walks up only as far assrc/exo/download/when deriving a module name, so the eight files undersrc/exo/download/tests/are imported astests.test_*. Withpythonpath = ".", the repo's top-leveltests/package wins that name and the imports fail:The failure only appears in a full-suite run —
pytest src/exo/download/testsalone passes, which is likely why it went unnoticed.2.
rust/exo_rs/tests/test_python.pycallsNetworkingHandle.new()with three arguments. The zenoh migration (#2132) added anamespaceparameter:so the test raises
TypeError: NetworkingHandle.new() missing 1 required positional argument: 'discovery_service_port'.Fix
Add the missing
__init__.py, and pass a namespace in the test.Result
uv run pytestThe 68 tests under
src/exo/download/tests/had not been running as part of a full-suite invocation.