Skip to content

fix: resolve broken test imports causing pytest collection errors#1044

Open
KhadyotTakale wants to merge 1 commit intoScrapeGraphAI:pre/betafrom
KhadyotTakale:feat/khadyot-takale-contribution
Open

fix: resolve broken test imports causing pytest collection errors#1044
KhadyotTakale wants to merge 1 commit intoScrapeGraphAI:pre/betafrom
KhadyotTakale:feat/khadyot-takale-contribution

Conversation

@KhadyotTakale
Copy link

Problem

Two test files fail during pytest collection due to stale imports, preventing the full test suite from running:

  • tests/graphs/scrape_graph_test.py — imports ScrapeGraph which no longer exists
  • tests/graphs/xml_scraper_openai_test.py — imports convert_to_csv/convert_to_json which were renamed

Changes

  • Replaced ScrapeGraph with SmartScraperGraph and added the required prompt parameter
  • Replaced convert_to_csv/convert_to_json with export_to_csv/export_to_json

Verification

pytest --collect-only now collects 270 tests with 0 errors (previously 2 collection errors).

- Replace removed ScrapeGraph with SmartScraperGraph in scrape_graph_test.py
- Replace renamed convert_to_csv/convert_to_json with export_to_csv/export_to_json in xml_scraper_openai_test.py
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. bug Something isn't working tests Improvements or additions to test labels Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size:S This PR changes 10-29 lines, ignoring generated files. tests Improvements or additions to test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant