Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A Django plugin for pytest.

License

NotificationsYou must be signed in to change notification settings

pytest-dev/pytest-django

Repository files navigation

PyPI VersionSupported Python versionsBuild StatusSupported Django versionsCoverage

Welcome to pytest-django!

pytest-django allows you to test your Django project/applications with thepytest 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 featuresthat 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 otherpytest plugins.
  • Works with both worlds: Existing unittest-style TestCase's still work without any modifications.

See thepytest documentation for more information on pytest itself.


[8]ページ先頭

©2009-2025 Movatter.jp