Skip to main content

A Django plugin for pytest.

Project description

PyPI Version Supported Python versions Build Status Supported Django versions Coverage

Welcome to pytest-django!

pytest-django allows you to test your Django project/applications with the pytest testing tool.

Install pytest-django

pip install pytest-django

Why would I use this instead of Django’s manage.py test command?

Running your test suite with pytest-django allows you to tap into the features that are already present in pytest. Here are some advantages:

  • Manage test dependencies with pytest fixtures.

  • Less boilerplate tests: no need to import unittest, create a subclass with methods. Write tests as regular functions.

  • Database re-use: no need to re-create the test database for every test run.

  • Run tests in multiple processes for increased speed (with the pytest-xdist plugin).

  • Make use of other pytest plugins.

  • Works with both worlds: Existing unittest-style TestCase’s still work without any modifications.

See the pytest documentation for more information on pytest itself.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytest-django-4.6.0.tar.gz (83.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytest_django-4.6.0-py3-none-any.whl (22.6 kB view details)

Uploaded Python 3

File details

Details for the file pytest-django-4.6.0.tar.gz.

File metadata

  • Download URL: pytest-django-4.6.0.tar.gz
  • Upload date:
  • Size: 83.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for pytest-django-4.6.0.tar.gz
Algorithm Hash digest
SHA256 ebc12a64f822a1284a281caf434d693f96bff69a9b09c677f538ecaa2f470b37
MD5 f80b48a4a27f81b7ae8188ce2ef321af
BLAKE2b-256 f97a59a6272a1300bb511607aa50d902cbce270bfdeec7ea9f6ff95701f99306

See more details on using hashes here.

File details

Details for the file pytest_django-4.6.0-py3-none-any.whl.

File metadata

  • Download URL: pytest_django-4.6.0-py3-none-any.whl
  • Upload date:
  • Size: 22.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for pytest_django-4.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7e90a183dec8c715714864e5dc8da99bb219502d437a9769a3c9e524af57e43a
MD5 570da80251c7d7176ee8ab71b04912bd
BLAKE2b-256 347444c702c2a1a2578a576395ec51ccbbf2a140c0b8da62fa45a9f414f3d3a7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page