test: make test_stream_run.py resolve its feature group standalone - #1088
Open
dchaudhari7177 wants to merge 1 commit into
Open
test: make test_stream_run.py resolve its feature group standalone#1088dchaudhari7177 wants to merge 1 commit into
dchaudhari7177 wants to merge 1 commit into
Conversation
test_stream_run.py requests the feature EngineRunnerTest1, whose FeatureGroup is defined in tests/test_core/test_integration/test_core/test_runner_one_compute_framework. Resolution walks live FeatureGroup subclasses, so the module has to be imported before stream_run plans. Nothing in test_stream_run.py imported it: the tests only passed because tests/test_core/test_runtime/conftest.py imports it for test_stream_all.py, and a full run collects that package first. Running the file on its own failed two of three tests with FeatureResolutionError: No feature groups found for feature name: 'EngineRunnerTest1'. Import the defining module from the test module itself, the same one-line registration test_stream_all.py already relies on. Also drop the module docstring's claim that all tests are expected to fail because mlodaAPI has no stream_run method; the method exists and the file has been green in full runs for a while. Closes mloda-ai#1084
dchaudhari7177
force-pushed
the
fix/stream-run-standalone-fixture
branch
from
August 7, 2026 03:50
f304cbf to
b5ea1a1
Compare
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.
Closes #1084.
The dependency
test_stream_run.pyrequests the featureEngineRunnerTest1. Its FeatureGroup is defined intests/test_core/test_integration/test_core/test_runner_one_compute_framework.py. Resolution walks liveFeatureGroupsubclasses, so that module has to be imported beforestream_runplans.Nothing in
test_stream_run.pyimported it. The tests passed only becausetests/test_core/test_runtime/conftest.pyimports that module fortest_stream_all.py, and a full run collects the sibling package first.Reproduction, on a clean tree
2 failed, 1 passed. A fulltoxrun is green, which is what kept this invisible at the gate.The change
Import the defining module from the test module itself — the same one-line registration
tests/test_core/test_runtime/conftest.pyalready relies on, with the same reasoning in a comment.tests/test_core/test_runtime/conftest.pyis left in place:test_stream_all.pystill needs it, and it is that package's own registration.Verification
pytest tests/test_core/test_api/test_stream_run.pypytest .../test_stream_run.py .../test_runtime/test_stream_all.pyGates on the changed file:
ruff format --check --line-length 120,ruff check,mypy --strict --ignore-missing-importsall clean.One unrelated line in the same file
The module docstring still claimed:
stream_runexists and the file has been green in full runs for a while, so that paragraph is dropped. Happy to pull it back out if you would rather keep this diff to the import alone.