Test Execution Guide¶
Pytest Markers¶
This project uses pytest markers to categorize tests:
unit: Fast unit tests with no external dependenciesfunctional: Tests that interact with CLI or use mocked dependenciesintegration: Tests with real external dependenciesslow: Tests that take significant time (system resource access, etc.)
Running Tests¶
Fast Development Workflow¶
Skip slow tests for quick feedback during development:
Full Test Suite¶
Run all tests including slow ones:
Specific Categories¶
Run only specific test categories:
pytest -m "unit" # Only unit tests
pytest -m "functional" # Only functional tests
pytest -m "slow" # Only slow tests
pytest -m "unit or functional and not slow" # Complex combinations
Coverage Without Slow Tests¶
Environment Tests¶
The tests/functional/test_environment.py tests are marked as slow because they:
- Access real system resources (CPU info, memory stats)
- Read/write to filesystem cache
- Take longer to execute
These tests are important for validating cross-platform behavior but can be skipped during rapid development cycles.