Files
skill-seekers-reference/tests
yusyus a9c07a66ad Fix GitHub Actions test failures for unified MCP integration
Fixed async test issues that were causing CI failures.

## Issue:
GitHub Actions tests were failing with:
- 4 FAILED tests/test_unified_mcp_integration.py (async def functions not supported)
- 346 passed tests

## Root Cause:
The new test_unified_mcp_integration.py file had async test functions without proper pytest-anyio configuration, causing pytest to fail when trying to run them.

## Fix:

1. **Added pytest.mark.anyio markers**
   - Added module-level pytestmark = pytest.mark.anyio
   - Ensures all async functions are recognized by anyio plugin

2. **Created tests/conftest.py**
   - Overrides anyio_backend fixture to use only 'asyncio'
   - Prevents tests from attempting to use 'trio' backend (not installed)
   - Reduces test duplication (was running each test for both asyncio + trio)

3. **Updated README.md**
   - Already pushed in previous commit (b4f9052)
   - Updated descriptions to reflect GitHub scraping capability

## Test Results:

**Before Fix:**
- 4 failed, 346 passed (in CI)
- Error: "async def functions are not natively supported"

**After Fix:**
- 4 passed tests/test_unified_mcp_integration.py
- All tests use asyncio backend only
- No trio-related errors

## Files Changed:

1. tests/test_unified_mcp_integration.py
   - Added pytestmark = pytest.mark.anyio at module level
   - All 4 async test functions now properly marked

2. tests/conftest.py (NEW)
   - Created pytest configuration file
   - Overrides anyio_backend to 'asyncio' only
   - Prevents unnecessary test duplication

## Verification:

Local test run successful:
```
tests/test_unified_mcp_integration.py::test_mcp_validate_unified_config PASSED
tests/test_unified_mcp_integration.py::test_mcp_validate_legacy_config PASSED
tests/test_unified_mcp_integration.py::test_mcp_scrape_docs_detection PASSED
tests/test_unified_mcp_integration.py::test_mcp_merge_mode_override PASSED
4 passed in 0.21s
```

Expected CI result: 350/350 tests passing (up from 346/350)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-26 17:19:06 +03:00
..