Skip to main content

A Django plugin for py.test.

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-2.9.1.tar.gz (50.6 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-2.9.1-py2.py3-none-any.whl (18.7 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

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

File hashes

Hashes for pytest-django-2.9.1.tar.gz
Algorithm Hash digest
SHA256 8be15b637738c8cbd1422a6461465c0aeab7839cf76ad2b5d190b6f1f53facd6
MD5 3c9dde85e99ec409df209a62b4715e1a
BLAKE2b-256 506d77a4644d15746ed2a243ed557af693cec7887e43b357919ba0b4fd029518

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pytest_django-2.9.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 743d0056e127ef424850ea76d93d45c92c313da0e56765806a59fc7680c25ab7
MD5 a4d03d52d2c3e1790c68ed0cf8c3ee8c
BLAKE2b-256 c8b7550b718674971059d1f3a33db3991380a8ae3aa02b42f2b51edc02fd71ec

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