-
Notifications
You must be signed in to change notification settings - Fork 613
[CHORE][PYTEST]: Add verbose test output option for real-time test name visibility #2665
Copy link
Copy link
Closed
Copy link
Labels
COULDP3: Nice-to-have features with minimal impact if left out; included if time permitsP3: Nice-to-have features with minimal impact if left out; included if time permitschoreLinting, formatting, dependency hygiene, or project maintenance choresLinting, formatting, dependency hygiene, or project maintenance chorestest-automationAutomated testingAutomated testing
Milestone
Description
Overview
When running make test, pytest only shows dots (.) for passing tests due to parallel execution with pytest-xdist (-n 16). This makes it difficult to identify which tests are running or failing in real-time, especially during debugging sessions.
Current State
Makefile test target (line 546):
uv run --active pytest -n 16 --maxfail=0 -v --ignore=tests/fuzzpyproject.toml addopts (line 592):
addopts = "-ra -q --ignore=tests/playwright --ignore=tests/migration --ignore=tests/performance"Problem:
- The
-vflag is present but ineffective with-n 16(xdist parallel mode) - With 16 workers running concurrently, output is aggregated as dots
- Test names only appear after batches complete, not in real-time
- Developers cannot see which test is failing until the entire suite completes
Proposed Implementation
Add a new test-verbose target for sequential execution with full test names:
test-verbose:
@echo "🧪 Running tests (verbose, sequential)..."
@test -d "$(VENV_DIR)" || $(MAKE) venv
@/bin/bash -c "source $(VENV_DIR)/bin/activate && \
export DATABASE_URL='sqlite:///:memory:' && \
export TEST_DATABASE_URL='sqlite:///:memory:' && \
export ARGON2ID_TIME_COST=1 && \
export ARGON2ID_MEMORY_COST=1024 && \
uv run --active pytest --maxfail=1 -v --tb=short --ignore=tests/fuzz"Alternative: Add pytest-instafail for parallel + instant failure display:
# Add to dev dependencies
uv add --dev pytest-instafail
# Update test target
uv run --active pytest -n 16 --maxfail=1 -v --instafail --ignore=tests/fuzzOptions Comparison
| Option | Parallelism | Real-time Names | Use Case |
|---|---|---|---|
test (current) |
16 workers | ❌ Dots only | CI/CD, full suite |
test-verbose (new) |
Sequential | ✅ All names | Debugging, development |
test + instafail |
16 workers | Fast feedback on errors |
Acceptance Criteria
- Add
test-verbosetarget to Makefile for sequential verbose output - Test names display in real-time when using
make test-verbose - Document usage in Makefile help text
- (Optional) Add
pytest-instafailto dev dependencies for parallel failure visibility - Existing
make testbehavior unchanged (CI/CD compatibility)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
COULDP3: Nice-to-have features with minimal impact if left out; included if time permitsP3: Nice-to-have features with minimal impact if left out; included if time permitschoreLinting, formatting, dependency hygiene, or project maintenance choresLinting, formatting, dependency hygiene, or project maintenance chorestest-automationAutomated testingAutomated testing