ECC/docs/tr/rules/python/testing.md

39 lines
624 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
paths:
- "**/*.py"
- "**/*.pyi"
---
# Python Testing
> Bu dosya [common/testing.md](../common/testing.md) dosyasını Python'a özgü içerikle genişletir.
## Framework
Test framework'ü olarak **pytest** kullan.
## Coverage
```bash
pytest --cov=src --cov-report=term-missing
```
## Test Organizasyonu
Test kategorizasyonu için `pytest.mark` kullan:
```python
import pytest
@pytest.mark.unit
def test_calculate_total():
...
@pytest.mark.integration
def test_database_connection():
...
```
## Referans
Detaylı pytest pattern'leri ve fixture'lar için skill: `python-testing` dosyasına bakın.