# pytest-dev/pytest-django

A Django plugin for pytest.

Repository: https://github.com/pytest-dev/pytest-django
Canonical: https://ross.abutalabs.com/products/pytest-django
Homepage: https://pytest-django.readthedocs.io/
Language: Python
License: NOASSERTION
License Family: other
Topics: python, django, pytest, pytest-plugin, python3
Last push: 2026-08-10T20:42:59+00:00

## Health v2 (maintenance only)
Score: 98/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 97, release rhythm 97, longevity 100
- inputs: {"age_days": 5452, "days_push": 23, "days_rel": 23, "gap_med": 4, "n_releases_24m": 6}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1544, forks 365 (observed 2026-08-28T04:05:01.286696+00:00)

## What it is
pytest-django is a pytest plugin that lets you test Django projects and applications with pytest instead of Django's manage.py test runner. It provides fixtures, database reuse, and seamless integration with existing unittest-style test cases.

## Use cases
- test a django app with pytest instead of manage.py test
- write django tests as plain functions without unittest boilerplate
- reuse the test database across test runs for speed
- manage test dependencies with pytest fixtures in django
- run django tests in parallel with pytest-xdist
- use pytest plugins with an existing django test suite

## When to choose
- you have a Django project and prefer pytest's fixtures and plugin ecosystem
- you want faster test runs via database reuse and parallel execution
- you need to keep existing unittest-style Django tests working while migrating to pytest

## When to avoid
- your project is not Django-based
- you are happy with Django's built-in test runner and don't need pytest features
- you need a testing tool for non-Python stacks

## Facets
- artifact type: plugin
- maturity: stable
- function: testing, e2e-testing
- domain: testing, web-development, developer-tools
- platform: python, cli, cross-platform
- tags: pytest-plugin, django, test-runner, fixtures, unit-testing

## Member repositories
- pytest-dev/pytest-django (main) score 98

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:01.286696+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:30:39.068256+00:00, confidence not recorded.
  - readme: https://github.com/pytest-dev/pytest-django (fetched 2026-08-28T04:05:01.286696+00:00, sha af61d7cdb54b)
  - registry_pypi: https://pypi.org/pypi/pytest-django/json (fetched 2026-08-29T11:32:29.828232+00:00, sha 4fe84da33cf9)
- Data as of 2026-08-30T08:39:29.467469+00:00.
