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-4.0.0.tar.gz (72.0 kB view details)

Uploaded Source

Built Distribution

pytest_django-4.0.0-py2.py3-none-any.whl (18.4 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: pytest-django-4.0.0.tar.gz
  • Upload date:
  • Size: 72.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for pytest-django-4.0.0.tar.gz
Algorithm Hash digest
SHA256 5f964ccda1f551e00589ab0679a7c45c36c509a44b5bfb5ad07954e0ae3f4bed
MD5 22256353125b05914538c08f462fc4dd
BLAKE2b-256 d980ca2d88c0b4719ca17b4aa121d6019501c570859887d3331368133686f0b0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pytest_django-4.0.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 18.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for pytest_django-4.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 0e91003fdd41ac0322c1978682be2ca180bc564203dd53c698f99242bf513614
MD5 8cf91f0d17a1d8b49ae7e5692ed211a4
BLAKE2b-256 8232d4e66e726a24096efcd27693ccf0f633971e85e1abdb6076e3a7b10503e9

See more details on using hashes here.

Supported by

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