Skip to main content

Prerequisites

Install uv.

Test suites

There are three test suites:
SuiteLocationWhat it tests
Unit testspython_modules/proxy-hopper/tests/Core package — config, pool, handlers, CLI wiring
Redis testspython_modules/proxy-hopper-redis/tests/Redis backend — requires a running Redis instance
Contract testspython_modules/tests/Backend contract — runs the same test suite against both backends

Running tests

# Core unit tests
cd python_modules/proxy-hopper
uv sync --all-extras
uv run pytest

# Redis backend tests (requires Redis on localhost:6379)
cd python_modules/proxy-hopper-redis
uv sync --all-extras
uv run pytest

# Cross-backend contract tests
cd python_modules/tests
uv sync
uv run pytest

Running Redis locally

docker run -d -p 6379:6379 redis:7-alpine
The contract tests read the Redis URL from REDIS_URL (defaults to redis://localhost:6379/0):
REDIS_URL=redis://localhost:6379/0 uv run pytest

Test options

# Verbose output
uv run pytest -v

# Short traceback (used in CI)
uv run pytest --tb=short -q

# Run a specific test file
uv run pytest tests/test_pool.py

# Run tests matching a keyword
uv run pytest -k "quarantine"