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.12.0.tar.gz (91.2 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.12.0-py3-none-any.whl (26.1 kB view details)

Uploaded Python 3

File details

Details for the file pytest_django-4.12.0.tar.gz.

File metadata

  • Download URL: pytest_django-4.12.0.tar.gz
  • Upload date:
  • Size: 91.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pytest_django-4.12.0.tar.gz
Algorithm Hash digest
SHA256 df94ec819a83c8979c8f6de13d9cdfbe76e8c21d39473cfe2b40c9fc9be3c758
MD5 bfc2a74e97adde2fc1b4a1a6ecfee50d
BLAKE2b-256 132bdb9a193df89e5660137f5428063bcc2ced7ad790003b26974adf5c5ceb3b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytest_django-4.12.0.tar.gz:

Publisher: deploy.yml on pytest-dev/pytest-django

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: pytest_django-4.12.0-py3-none-any.whl
  • Upload date:
  • Size: 26.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pytest_django-4.12.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3ff300c49f8350ba2953b90297d23bf5f589db69545f56f1ec5f8cff5da83e85
MD5 77079daa723f133c9ce8144890aa567d
BLAKE2b-256 83a541d091f697c09609e7ef1d5d61925494e0454ebf51de7de05f0f0a728f1d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytest_django-4.12.0-py3-none-any.whl:

Publisher: deploy.yml on pytest-dev/pytest-django

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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