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

Uploaded Source

Built Distribution

pytest_django-4.5.1-py3-none-any.whl (20.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytest-django-4.5.1.tar.gz
  • Upload date:
  • Size: 79.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.0 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.1.tar.gz
Algorithm Hash digest
SHA256 01fe1242e706375d7c942d206a30826bd9c0dffde99bfac627050cdc91f0d792
MD5 1ed24e94716d9433c8e1633ab2348d46
BLAKE2b-256 cf4ebe2fdce74da4730fdbcab99a0b323fbe108f2dc61fca31a611ef345c865b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pytest_django-4.5.1-py3-none-any.whl
  • Upload date:
  • Size: 20.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.0 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 13a956a0016cd37f889d5d3a8a36c0c90da44d6fdc7704e4e13f08d2f76f78f7
MD5 f7663f7f95d399467fc23ded401f22a0
BLAKE2b-256 0304c658cf0e4f1740980dfb18eb4c7c479b3fed578906f748835e619c59efa8

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