Repository navigation
Python: Remove the stale hosted toolbox endpoint sample test - #9762
Draft
Naveen Chatlapalli (1aifanatic) wants to merge 1 commit into
Draft
Naveen Chatlapalli (1aifanatic) wants to merge 1 commit into
Naveen Chatlapalli (1aifanatic) wants to merge 1 commit into
Conversation
tests/samples/hosting/test_toolbox_endpoint.py loads 04_foundry_toolbox and 06_files, which microsoft#7405 renamed, and the samples no longer define resolve_toolbox_endpoint, so pytest tests/samples stops at collection. The resolver now lives in agent_framework_foundry_hosting and is covered by its own tests; port the remaining trailing-slash case there. Part of microsoft#9761. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Naveen Chatlapalli (1aifanatic)
temporarily deployed
to
github-app-auth
October 27, 2026 12:56 — with
GitHub Actions
Inactive
Naveen Chatlapalli (1aifanatic)
temporarily deployed
to
github-app-auth
October 27, 2026 12:56 — with
GitHub Actions
Inactive
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The narrow test-only changes remove obsolete imports and preserve the deleted test scenarios without changing production behavior.
No open issues 🎉
What changed in this PR
This test-only PR removes an obsolete hosting sample test that blocks collection and preserves its coverage in the Foundry hosting package tests. It addresses the hosting portion of #9761; the three stale getting_started modules remain out of scope.
Changes:
- Delete tests that import renamed samples and reference a resolver those samples no longer define.
- Parameterize the package resolver test to cover project endpoints with zero, one, or three trailing slashes.
| File | Description |
|---|---|
python/tests/samples/hosting/test_toolbox_endpoint.py |
Remove the obsolete sample test module causing a collection error. |
python/packages/foundry_hosting/tests/test_toolbox.py |
Preserve trailing-slash coverage against the package resolver. |
Review effort: Balanced
This branch was previously deployed
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.
Motivation & Context
python/tests/samples/hosting/test_toolbox_endpoint.pyloadsresponses/04_foundry_toolbox/main.pyandresponses/06_files/main.pyat import time. #7405 renamed those folders tofoundry_toolboxandfiles. The samples also no longer defineresolve_toolbox_endpoint: they useFoundryToolbox, which resolves the endpoint inagent_framework_foundry_hosting._toolbox._resolve_toolbox_endpoint. The module therefore fails at collection:That stops every
pytest tests/samples ...run, including the CI sample steps. #9761 describes this and three similarly stalegetting_startedmodules.Description & Review Guide
tests/samples/hosting/test_toolbox_endpoint.py.packages/foundry_hosting/tests/test_toolbox.pyalready covers four of its five cases against the real resolver: explicit endpoint, empty endpoint, built fallback, and missing inputs. The fifth case, several trailing slashes onFOUNDRY_PROJECT_ENDPOINT, is added by parametrizingtest_resolve_endpoint_builds_from_project_and_nameover no slash, one slash and three slashes.getting_startedmodules in Python: tests/samples fails to collect because four test modules import samples that no longer exist #9761 need a decision about whether to repoint them or remove them, so this PR leaves them alone.The
foundry_hostingsuite passes (917 passed, 28 skipped, 8 xpassed).pytest tests/samples --collect-onlyno longer reports the hosting module; the threegetting_startederrors remain, tracked in #9761.Related Issue
Part of #9761
AI Assistance
AI assistance details: Claude Code helped find the stale test, compare its cases with the package tests, make the change, and draft this description.
Contribution Checklist
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.🤖 Generated with Claude Code