Skip to content

Add core test suite for proxy, storage, and robots logic - #6

Merged
Shellghostt merged 1 commit into
mainfrom
test-suite-core
Nov 9, 2026
Merged

Shellghostt merged 1 commit into
mainfrom
test-suite-core

Conversation

@Shellghostt

Copy link
Copy Markdown
Owner

Closes #2

What

First automated test suite for WebVac (43 tests, all offline/deterministic):

  • tests/test_proxy.py — proxy line parsing, URL/credential quoting, SOCKS helpers, strategy selection (round-robin order, latency top-third, random, exclusion), cooldown reactivation, transient/hard failure retirement thresholds, success reset, latency EMA, status counts, error classification.
  • tests/test_storage.py — JSON/CSV/SQLite/Markdown writers against the legacy layout in a tmp dir: round-trip, CSV flattening/key union, SQLite scalar + JSON columns, empty-data and unknown-format behaviour.
  • tests/test_robots.py — robots handling with the download stubbed: disallow rules, 404 allow-all, 403 disallow-all, respect_robots=False, unfetched-origin default, origin parsing.

Also declares pytest in the dev extra (pip install -e ".[dev]").

Test

python -m pytest tests -q — 43 passed in ~1s. No browser or network required.

@Shellghostt
Shellghostt merged commit a3f710b into main Nov 9, 2026
@Shellghostt
Shellghostt deleted the test-suite-core branch November 9, 2026 02:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add test suite for core crawl and proxy logic

1 participant