Remove stale test_dispatches_compute (closes #79)#99
Open
vahid-ahmadi wants to merge 1 commit into
Open
Conversation
The `compute` tool/function was rewritten to `run_python` long ago and no longer exists in agent_tools.py. The test file still imported `compute` and referenced it in `TestExecuteTool.test_dispatches_compute` and the standalone `TestCompute` class, breaking test collection (ImportError) and failing with KeyError on the dispatcher test. Remove the stale `compute` import, the `test_dispatches_compute` dispatcher test, and the `TestCompute` class. Neighboring tests are untouched. Closes #79 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Beta preview is ready.
|
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.
Summary
The
computetool was rewritten torun_pythonlong ago and no longer exists inagent_tools.py.backend/tests/test_agent_tools.pystill importedcomputeand referenced it, which broke the file entirely:from agent_tools import (... compute ...)raisedImportError, so the whole test file failed to collect.TestExecuteTool.test_dispatches_computecalledexecute_tool("compute", ...), which only registersrun_pythonandgenerate_chart, failing withKeyError.Changes
computeimport.TestExecuteTool.test_dispatches_compute.TestComputeclass (all of its tests called the removedcomputefunction).test_dispatches_generate_chartand all other tests untouched.Testing
python -m pytest tests/test_agent_tools.py::TestExecuteTool -q→ 2 passed.ModuleNotFoundError: policyengine_uk_compiled is not importable, an unrelated local environment limitation (the compiled PolicyEngine engine isn't installed in this sandbox), not caused by this change.Closes #79
🤖 Generated with Claude Code