Testing
Testing
Required
Validasi behavior mulai dari smallest relevant tests hingga complete suite.
Command
pytestCategory
Developer Guide
Quick Command
pytest [PATH] [OPTIONS]Test Layersâ
Unit tests memeriksa focused resolver dan service behavior; integration tests memeriksa boundaries; CLI tests memeriksa parsing, output, dan exit behavior.
Focused Validationâ
Terminal
bashpython -m pytest tests/path/to/test_file.py -q
python -m pytest tests/path/to/test_file.py::test_name -qPre-Commit Quality Gatesâ
Repository hooks menggunakan Ruff untuk linting dan safe lint fixes, Black sebagai single Python formatter, serta utility hooks untuk trailing whitespace dan final newline. Ruff dan Black membaca policy dari pyproject.toml.
Terminal
bash# Validate hook configuration
make pre-commit-validate
# Check staged files
make pre-commit-run-staged
# Check semua tracked files
make pre-commit-runComplete Validationâ
Terminal
bashpython -m pytest
python -m ruff check .
python -m black --check .
make checkBefore You Begin
- Focused tests passRequired
Relevant subsystem behavior tercakup.
- Full suite passesRequired
Tidak ada regression lintas subsystem.
- Docs alignedRequired
User-facing behavior dan examples tetap akurat.