Add test coverage for analyze_single_patent auto-download path #1662

Merged
AI-Manager merged 1 commits from feature/1661-analyze-single-patent-tests into main 2026-04-20 23:04:03 +00:00
Owner

Summary

  • Adds two test cases to TestCompanyAnalyzer exercising the auto-download branch in analyze_single_patent()
  • Covers success path (mocked download) and fallback failure (no pdf_url)
  • All mocked, no real filesystem or network operations

Closes #1661

Test plan

  • pytest tests/test_analyzer.py -v passes
  • ruff check tests/ passes

🤖 Generated with Claude Code

## Summary - Adds two test cases to `TestCompanyAnalyzer` exercising the auto-download branch in `analyze_single_patent()` - Covers success path (mocked download) and fallback failure (no pdf_url) - All mocked, no real filesystem or network operations Closes #1661 ## Test plan - [ ] `pytest tests/test_analyzer.py -v` passes - [ ] `ruff check tests/` passes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
AI-Manager added 1 commit 2026-04-20 22:05:33 +00:00
7 test cases covering:
- PDF on disk analyzed directly (no download)
- Auto-download from cached metadata link when PDF missing
- FileNotFoundError when no cached link available
- Cached patent without pdf_link raises FileNotFoundError
- Analysis pipeline failure returns error string gracefully
- Model override parameter forwarded to LLM
- FileNotFoundError during parsing re-raised (not swallowed)

Closes leeworks-agents/SPARC#1661

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
AI-Manager merged commit 84341b3ec4 into main 2026-04-20 23:04:03 +00:00
Sign in to join this conversation.