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

Uploaded Source

Built Distribution

pytest_django-4.7.0-py3-none-any.whl (23.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytest-django-4.7.0.tar.gz
  • Upload date:
  • Size: 82.8 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.7.0.tar.gz
Algorithm Hash digest
SHA256 92d6fd46b1d79b54fb6b060bbb39428073396cec717d5f2e122a990d4b6aa5e8
MD5 8fffa6ed7fc7a3e0b2abc7a41134616b
BLAKE2b-256 e27a025a7b663c06d9d648de533e96bd708ba7a4c6983c5fcac4439d00dfabd2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pytest_django-4.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4e1c79d5261ade2dd58d91208017cd8f62cb4710b56e012ecd361d15d5d662a2
MD5 2493dfa6e92932f00f29c43927f13061
BLAKE2b-256 6b29b0e1dbe147a1d198933d5c5ffe7913a4495a54c1100dfc7513fb20ef0cd2

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