Commit 611230c
authored
Python: improve misc-integration test robustness (#5295)
* Python: use local MCP server for hosted tools test and broaden image assertion
The hosted tools integration test was hitting rate limits on the external
learn.microsoft.com MCP server, causing persistent failures that retries
couldn't recover from. Switch to the local MCP server already spun up in
CI via LOCAL_MCP_URL, skipping when the env var isn't set.
Also broaden the image description assertion to accept common synonyms
(cottage, mansion, villa, etc.) instead of just "house", since the model
legitimately uses varied vocabulary for the same image.
* Address review feedback: validate LOCAL_MCP_URL scheme and use word boundaries
- Skip hosted tools test when LOCAL_MCP_URL lacks http/https scheme,
matching the pattern used in test_mcp.py.
- Use regex word boundaries for image assertion to avoid false matches
like "villain" matching "villa".1 parent f112150 commit 611230c
1 file changed
Lines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
1503 | 1504 | | |
1504 | 1505 | | |
1505 | 1506 | | |
| 1507 | + | |
| 1508 | + | |
| 1509 | + | |
| 1510 | + | |
1506 | 1511 | | |
1507 | 1512 | | |
1508 | 1513 | | |
1509 | 1514 | | |
1510 | 1515 | | |
1511 | 1516 | | |
1512 | 1517 | | |
1513 | | - | |
1514 | | - | |
| 1518 | + | |
| 1519 | + | |
1515 | 1520 | | |
1516 | 1521 | | |
1517 | 1522 | | |
| |||
1607 | 1612 | | |
1608 | 1613 | | |
1609 | 1614 | | |
1610 | | - | |
| 1615 | + | |
| 1616 | + | |
1611 | 1617 | | |
1612 | 1618 | | |
1613 | 1619 | | |
| |||
0 commit comments