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

Uploaded Source

Built Distribution

pytest_django-4.5.2-py3-none-any.whl (20.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytest-django-4.5.2.tar.gz
  • Upload date:
  • Size: 79.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for pytest-django-4.5.2.tar.gz
Algorithm Hash digest
SHA256 d9076f759bb7c36939dbdd5ae6633c18edfc2902d1a69fdbefd2426b970ce6c2
MD5 5d7e84c0ebf467ba40ea0508ba7b6894
BLAKE2b-256 9b426d6563165b82289d4a30ea477f85c04386303e51cf4e4e4651d4f9910830

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pytest_django-4.5.2-py3-none-any.whl
  • Upload date:
  • Size: 20.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for pytest_django-4.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c60834861933773109334fe5a53e83d1ef4828f2203a1d6a0fa9972f4f75ab3e
MD5 bec4f082d467c95dbc5dca6caf5bc1ac
BLAKE2b-256 4b21b65ecd6686da400e2f6e3c49c2a428325abd979c9670cd97e1671f53296e

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