Skip to main content

A Django plugin for pytest.

Project description

PyPI Version Supported Python versions Build Status 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-3.8.0.tar.gz (70.0 kB view details)

Uploaded Source

Built Distribution

pytest_django-3.8.0-py2.py3-none-any.whl (19.3 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: pytest-django-3.8.0.tar.gz
  • Upload date:
  • Size: 70.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.7

File hashes

Hashes for pytest-django-3.8.0.tar.gz
Algorithm Hash digest
SHA256 489b904f695f9fb880ce591cf5a4979880afb467763b1f180c07574554bdfd26
MD5 19b977c9ce83cbf263911b1dd74b9a09
BLAKE2b-256 c199b415985195a7d850dbf6a0227d55dde98f261c280df191b1c689f1123018

See more details on using hashes here.

File details

Details for the file pytest_django-3.8.0-py2.py3-none-any.whl.

File metadata

  • Download URL: pytest_django-3.8.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 19.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.7

File hashes

Hashes for pytest_django-3.8.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 456fa6854d04ee625d6bbb8b38ca2259e7040a6f93333bfe8bc8159b7e987203
MD5 353e9d6e5bc5fbb6eff5c46f5e05aee2
BLAKE2b-256 6c5e19d4e7ff9cd1f003ee351f07f069630e64a5e8ea6eb949bfd0777cfa79fb

See more details on using hashes here.

Supported by

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