skillfed

pytest-django

A Django plugin for pytest.

pytest-django Permissive license pytest-django is released under the BSD (3-clause) license ---------------------------------------------------------- Copyright (c) 2015-2018, pytest-django authors (see AUTHORS file) All rights… (full text in the JSON record) Active 1,543 v4.14.0 released

Install

pytest-django on PyPI

pip

pip install pytest-django

uv

uv add pytest-django

poetry

poetry add pytest-django

Package facts

License pytest-django is released under the BSD (3-clause) license ---------------------------------------------------------- Copyright (c) 2015-2018, pytest-django authors (see AUTHORS file) All rights… (full text in the JSON record) (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 1 — pytest
Maintenance actively maintained — 3 days since the last release
Last repo commit
First released
Popularity one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13)
Known vulnerabilities none known (OSV.dev, checked 2026-08-13)

Evidence: pytest_django-4.14.0-py3-none-any.whl

Development Status :: 5 - Production/StableFramework :: DjangoFramework :: Django :: 5.2Framework :: Django :: 6.0Intended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Testing

About pytest-django

from the package's own PyPI description — quoted content, verbatim

.. image:: https://img.shields.io/pypi/v/pytest-django.svg?style=flat :alt: PyPI Version :target: https://pypi.python.org/pypi/pytest-django

.. image:: https://img.shields.io/pypi/pyversions/pytest-django.svg :alt: Supported Python versions :target: https://pypi.python.org/pypi/pytest-django

.. image:: https://github.com/pytest-dev/pytest-django/workflows/main/badge.svg :alt: Build Status :target: https://github.com/pytest-dev/pytest-django/actions

.. image:: https://img.shields.io/pypi/djversions/pytest-django.svg :alt: Supported Django versions :target: https://pypi.org/project/pytest-django/

.. image:: https://img.shields.io/codecov/c/github/pytest-dev/pytest-django.svg?style=flat :alt: Coverage :target: https://codecov.io/gh/pytest-dev/pytest-django

Welcome to pytest-django!

pytest-django allows you to test your Django project/applications with the pytest testing tool <https://pytest.org/>_.

  • Quick start / tutorial <https://pytest-django.readthedocs.io/en/latest/tutorial.html>_
  • Changelog <https://pytest-django.readthedocs.io/en/latest/changelog.html>_
  • Full documentation:...

Read as markdown · JSON record · Source repository · Docs

AI interpretation — verify before relying

AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page

pytest-django integrates Django with pytest, allowing you to write and run Django tests using pytest's fixtures, plugins, and streamlined syntax instead of Django's built-in test runner.

Low install friction with a single runtime dependency on pytest. Active maintenance: released 3 days ago with 1543 GitHub stars and continuous CI/CD signals.

BSD 3-clause permissive license allows commercial and private use with minimal restrictions; attribution and liability disclaimers apply.

Usage

pip install pytest-django

# In conftest.py or test file:
import pytest

@pytest.fixture
def example(db):
    pass

def test_example(example):
    assert True

Requires Python >=3.10 (CPython or PyPy); pytest >=7.0; Django 5.2, 6.0, or later. Django settings module must be configured via pytest.ini or DJANGO_SETTINGS_MODULE environment variable.

Verdict: pytest-django is a mature, actively maintained plugin (1543 stars, released 3 days ago) with permissive BSD licensing and low install friction. It bridges Django and pytest cleanly with a single dependency. No known vulnerabilities. Suitable for teams wanting pytest's fixture model and plugin ecosystem for Django testing.

Needs verification

  • Whether database transaction handling and test isolation behavior matches Django's default test runner in all scenarios
  • Performance characteristics compared to Django's manage.py test for large test suites
django testing with pytestpytest django plugindjango test fixturespytest django integrationdjango unit testing frameworkpytest-based django testsdjango test runner pytest

Similar packages