Skip to content

beyondgeeks/django-pytest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
beyondgeeks
Aug 25, 2022
3a6eb62 · Aug 25, 2022
Apr 26, 2022
May 27, 2022
Apr 26, 2022
Apr 26, 2022
Apr 26, 2022
May 8, 2021
Oct 9, 2020
Oct 16, 2020
Dec 1, 2021
Dec 26, 2017
Oct 30, 2018
Dec 2, 2021
Apr 26, 2022
Oct 16, 2020
Nov 27, 2021
Jun 28, 2018
Apr 26, 2022
Nov 27, 2021
Aug 25, 2022

Repository files navigation

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.