Skip to main content

A Django plugin for pytest.

Project description

Build Status

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-3.1.1.tar.gz (60.3 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-3.1.1-py2.py3-none-any.whl (18.9 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: pytest-django-3.1.1.tar.gz
  • Upload date:
  • Size: 60.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pytest-django-3.1.1.tar.gz
Algorithm Hash digest
SHA256 eb0d79d24ab2c0064c2d956603b77041508e25e6da50e92136ae1050d022ceaf
MD5 062a5e48952f3cec22ece994a2f1027f
BLAKE2b-256 e7da031650c2c11152c21e388281f47215912c12b85ea7f94ffdc4f16f271097

See more details on using hashes here.

File details

Details for the file pytest_django-3.1.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for pytest_django-3.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2e7e56192c37b282c05398f710083b8732a25d4a9b11a5a6759c8c390fffe0f5
MD5 399c7991e3b5c3b86faabb9b2a1a1a47
BLAKE2b-256 795c66037ef2958568d02a97d77e54dcc176e567d72e7cbd7f9793b4d0f92d08

See more details on using hashes here.

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