pytest

Installation
SKILL.md

Pytest Standards

Opinionated testing conventions for pytest, with Django-specific patterns included.

AAA Pattern (Arrange-Act-Assert)

Structure every test with # Arrange, # Act, # Assert comments separating setup, execution, and verification. Arrange primarily through fixtures. Omit any section you don't need rather than leaving it empty. Multiple assertions are fine when logically connected.

def test_user_service_create(sample_user, db_session):
    # Arrange
    service = UserService(db_session)

    # Act
    created_user = service.create(sample_user)
Installs
65
GitHub Stars
4
First Seen
Jun 24, 2026