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

Uploaded Source

Built Distribution

pytest_django-4.10.0-py3-none-any.whl (24.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pytest_django-4.10.0.tar.gz
Algorithm Hash digest
SHA256 1091b20ea1491fd04a310fc9aaff4c01b4e8450e3b157687625e16a6b5f3a366
MD5 830cccc7d0ae2ea71bc93d54e82d9354
BLAKE2b-256 a510a096573b4b896f18a8390d9dafaffc054c1f613c60bf838300732e538890

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pytest_django-4.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 57c74ef3aa9d89cae5a5d73fbb69a720a62673ade7ff13b9491872409a3f5918
MD5 5124a62ef1d9180f7ec66d549fd1be81
BLAKE2b-256 584ca4fe18205926216e1aebe1f125cba5bce444f91b6e4de4f49fa87e322775

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytest_django-4.10.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 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