Skip to content

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

Merged
VinciGit00 merged 1 commit intoScrapeGraphAI:pre/betafrom
KhadyotTakale:feat/khadyot-takale-contribution
Mar 15, 2026
Merged

fix: resolve broken test imports causing pytest collection errors#1044
VinciGit00 merged 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
@VinciGit00 VinciGit00 merged commit d547b74 into ScrapeGraphAI:pre/beta Mar 15, 2026
1 check passed
@github-actions
Copy link

🎉 This PR is included in version 1.60.0-beta.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working released on @dev 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.

2 participants