chore: Update pytest duration reporting in pyproject.toml and refine testing documentation

This commit is contained in:
Anish Sarkar 2026-02-25 18:36:55 +05:30
parent f52090391a
commit 2fef971fa9
2 changed files with 3 additions and 7 deletions

View file

@ -171,7 +171,7 @@ testpaths = ["tests"]
python_files = ["test_*.py"] python_files = ["test_*.py"]
python_classes = ["Test*"] python_classes = ["Test*"]
python_functions = ["test_*"] python_functions = ["test_*"]
addopts = "-v --tb=short -x --strict-markers -ra --durations=10" addopts = "-v --tb=short -x --strict-markers -ra --durations=5"
markers = [ markers = [
"document: document upload and processing tests", "document: document upload and processing tests",
"connector: connector indexing tests", "connector: connector indexing tests",

View file

@ -9,14 +9,10 @@ SurfSense uses [pytest](https://docs.pytest.org/) for end-to-end testing. Tests
Before running tests, make sure the full backend stack is running: Before running tests, make sure the full backend stack is running:
- **FastAPI backend** (`uv run main.py`) - **FastAPI backend**
- **PostgreSQL + pgvector** - **PostgreSQL + pgvector**
- **Redis** - **Redis**
- **Celery worker** — start with explicit queue names: - **Celery worker**
```bash
uv run celery -A celery_worker.celery_app worker --loglevel=info --concurrency=1 --pool=solo --queues="surfsense,surfsense.connectors"
```
Your backend must have **`REGISTRATION_ENABLED=TRUE`** in its `.env` (this is the default). The tests register their own user on first run. Your backend must have **`REGISTRATION_ENABLED=TRUE`** in its `.env` (this is the default). The tests register their own user on first run.