- Notifications
You must be signed in to change notification settings - Fork 568
test: add tests for either FastMCP implementation #5075
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
❌ 79 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
| dramatiq: TESTPATH=tests/integrations/dramatiq | ||
| falcon: TESTPATH=tests/integrations/falcon | ||
| fastapi: TESTPATH=tests/integrations/fastapi | ||
| fastmcp: TESTPATH=tests/integrations/fastmcp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: The fastmcp tox environment's TESTPATH in tox.ini line 808 points to a non-existent directory, preventing test discovery.
Severity: HIGH | Confidence: 1.00
🔍 Detailed Analysis
The fastmcp tox environment's TESTPATH is incorrectly configured in tox.ini at line 808. It points to tests/integrations/fastmcp, a non-existent directory. The actual test file, test_fastmcp.py, resides in tests/integrations/mcp. This misconfiguration prevents pytest from discovering and executing any tests for the fastmcp integration suite, resulting in a silent failure where no tests are run.
💡 Suggested Fix
Update tox.ini line 808 to set fastmcp: TESTPATH=tests/integrations/mcp. This will correctly direct pytest to the location of the fastmcp integration tests.
🤖 Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not valid. Location: tox.ini#L808 Potential issue: The `fastmcp` tox environment's `TESTPATH` is incorrectly configured in `tox.ini` at line 808. It points to `tests/integrations/fastmcp`, a non-existent directory. The actual test file, `test_fastmcp.py`, resides in `tests/integrations/mcp`. This misconfiguration prevents `pytest` from discovering and executing any tests for the `fastmcp` integration suite, resulting in a silent failure where no tests are run. Did we get this right? 👍 / 👎 to inform future reviews.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would put the new tests in a new tests/integrations/fastmcp directory.
If we changed the TESTPATH of the fastmcp entry to be tests/integrations/mcp, then we would be running mcp tests twice in our CI.
| @@ -0,0 +1,3 @@ | |||
| import pytest | |||
| | |||
| pytest.importorskip("mcp") | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Import Check Misroutes Tests to Wrong Package
The __init__.py file for fastmcp tests imports "mcp" instead of "fastmcp". This causes tests to be skipped when the mcp package is not installed, even though the tests are specifically for the fastmcp package. Since these are separate packages (as evidenced by the separate test directories and tox configuration), the importorskip should check for "fastmcp" availability, not "mcp".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is on purpose, because FastMCP can either be a part of the MCP SDK or a standalone package but both are dependant on mcp
| There are CI failures due to version bumps picked up by |
Issues
Closes https://linear.app/getsentry/issue/TET-1329/fastmcp-tests
Reminders
tox -e linters.feat:,fix:,ref:,meta:)