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.8.0.tar.gz (83.3 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.8.0-py3-none-any.whl (23.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pytest-django-4.8.0.tar.gz
Algorithm Hash digest
SHA256 5d054fe011c56f3b10f978f41a8efb2e5adfc7e680ef36fb571ada1f24779d90
MD5 1104adf875da923d08c460a2f5c2f46b
BLAKE2b-256 bdcf44510ac5479f281d6663a08dff0d93f56b21f4ee091980ea4d4b64491ad6

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pytest_django-4.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ca1ddd1e0e4c227cf9e3e40a6afc6d106b3e70868fd2ac5798a22501271cd0c7
MD5 c2f7e9f487bd8a5da3966b56aad19a41
BLAKE2b-256 935b29555191e903881d05e1f7184205ec534c7021e0ee077d1e6a1ee8f1b1eb

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