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

Uploaded Source

Built Distribution

pytest_django-4.11.1-py3-none-any.whl (25.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pytest_django-4.11.1.tar.gz
Algorithm Hash digest
SHA256 a949141a1ee103cb0e7a20f1451d355f83f5e4a5d07bdd4dcfdd1fd0ff227991
MD5 61bb4fc405460ac115ed326e2f45f50b
BLAKE2b-256 b1fb55d580352db26eb3d59ad50c64321ddfe228d3d8ac107db05387a2fadf3a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytest_django-4.11.1.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.11.1-py3-none-any.whl.

File metadata

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

File hashes

Hashes for pytest_django-4.11.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1b63773f648aa3d8541000c26929c1ea63934be1cfa674c76436966d73fe6a10
MD5 a1ba7233eaea6b78852caa0eb2ad8aef
BLAKE2b-256 beacbd0608d229ec808e51a21044f3f2f27b9a37e7a0ebaca7247882e67876af

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytest_django-4.11.1-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 Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page