Skip to content

Remove stale test_dispatches_compute (closes #79)#99

Open
vahid-ahmadi wants to merge 1 commit into
mainfrom
fix/remove-stale-compute-test
Open

Remove stale test_dispatches_compute (closes #79)#99
vahid-ahmadi wants to merge 1 commit into
mainfrom
fix/remove-stale-compute-test

Conversation

@vahid-ahmadi

Copy link
Copy Markdown
Collaborator

Summary

The compute tool was rewritten to run_python long ago and no longer exists in agent_tools.py. backend/tests/test_agent_tools.py still imported compute and referenced it, which broke the file entirely:

  • The module-level from agent_tools import (... compute ...) raised ImportError, so the whole test file failed to collect.
  • TestExecuteTool.test_dispatches_compute called execute_tool("compute", ...), which only registers run_python and generate_chart, failing with KeyError.

Changes

  • Removed the stale compute import.
  • Removed TestExecuteTool.test_dispatches_compute.
  • Removed the now-dead standalone TestCompute class (all of its tests called the removed compute function).
  • Left test_dispatches_generate_chart and all other tests untouched.

Testing

  • python -m pytest tests/test_agent_tools.py::TestExecuteTool -q → 2 passed.
  • Full file now collects/imports cleanly. The remaining failures in the full run are all 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

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>
@vercel

vercel Bot commented Jun 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
policyengine-uk-chat Ready Ready Preview, Comment Jun 8, 2026 8:23am

Request Review

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

Beta preview is ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stale test: TestExecuteTool.test_dispatches_compute references removed 'compute' tool

1 participant