Skip to content

Tests: Expand coverage for error paths and fallback paths #62

Description

@MozzamShahid

File / lines: Multiple test gaps across tests/

Problem: Several important error paths and fallback paths called out by AGENTS.md are not covered:

  • HTTP artifact collection failure path (scraper.py, lines 267-268)
  • Cookie jar LoadError path (scraper.py, lines 539-553)
  • LLM repair exception handling (place_scraper.py, lines 1335-1338)
  • Unsupported LLM policy ValueError (place_scraper.py, lines 2692-2693)
  • Place preview enrichment network-failure fallback (place_scraper.py, lines 2736-2778)
  • Saved-list parser HTML fallback path (parser.py, lines 137-138)
  • Consent "More options" two-step flow (scraper.py, lines 384-415)

Suggested fix: Add focused unit tests for each path. Use fixtures or mocked dependencies (e.g., patch _import_curl_requests, fake page objects) to exercise error handling without requiring network access.

Difficulty: good first issue
Impact: Medium — prevents regressions in failure handling and improves confidence in refactors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions