Skip to content

test: add toolserver_app.py unit-test coverage - #5

Open
man4ish wants to merge 1 commit into
mainfrom
test/toolserver-app-unit-coverage
Open

test: add toolserver_app.py unit-test coverage#5
man4ish wants to merge 1 commit into
mainfrom
test/toolserver-app-unit-coverage

Conversation

@man4ish

@man4ish man4ish commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds eight deterministic unit tests for toolserver_app.py. The tests invoke synchronous route handlers directly with temporary stores and fake executors, covering application setup, YAML loading, validation, run lifecycle responses, dynamic registration, stub behavior, health, and boundary paths.

Verification

  • Focused tests: 8 passed, 0 failed.
  • toolserver_app.py coverage: 100% statements/lines (93/93), 100% branches (20/20), 100% functions.
  • Ruff: passes on the new test file.
  • Existing toolserver package coverage remains 100% statements and branches in the recorded baseline.

Scope

  • Changed file: tests/test_toolserver_app_unit.py only.
  • Production source files modified: none.
  • Existing tests modified: none.
  • Coverage thresholds and exclusions changed: none.
  • No production fixes included.

Limitation

The pre-existing FastAPI/HTTP-client hang in the full endpoint tests remains documented and was not bypassed through production changes. The new tests use hermetic direct handler calls only to avoid external infrastructure and the hanging client path.

This PR is test-only and should remain open for review.

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.

1 participant