Other

项目介绍

pytest-dev/pytest-django 是一个托管在 GitHub 上的开源项目,主要使用 Python 编写,采用 Other 许可证,目前获得 1.5k 个 Star、368 次 Fork。

仓库全名
pytest-dev/pytest-django
开源许可证
Other
Star 数
1.5k
Fork 数
368
未关闭 Issue
194

README 摘要

:alt: PyPI Version :target: https://pypi.python.org/pypi/pytest-django :alt: Supported Python versions :target: https://pypi.python.org/pypi/pytest-django :alt: Build Status :target: https://github.com/pytest-dev/pytest-django/actions :alt: Supported Django versions :target: https://pypi.org/project/pytest-django/ :alt: Coverage :target: https://codecov.io/gh/pytest-dev/pytest-django Welcome to pytest-django…

完整内容见 GitHub 原始 README 或本页 。

常见问题

pytest-django 用什么语言开发?

主要使用 Python 编写,采用 Other 许可证,目前有 1.5k 个 Star。

pytest-django 可以免费商用吗?

仓库标注的许可证为 Other,商用前请先阅读仓库 LICENSE 文件确认授权范围。

如何获取 pytest-django 的源码?

可以直接克隆仓库:git clone https://github.com/pytest-dev/pytest-django.git,默认分支为 main;安装与运行步骤见仓库 README。

pytest-django 最近还在维护吗?

仓库最近一次更新为 6 天前,当前有 194 个未关闭 Issue;Star 数为 1.5k,可作为社区活跃度的参考。

简要分析

热度分
2321
价值分
1033
活跃状态
活跃

语言占比

Python

Release

README

… image:: https://img.shields.io/pypi/v/pytest-django.svg?style=flat :alt: PyPI Version :target: https://pypi.python.org/pypi/pytest-django

… image:: https://img.shields.io/pypi/pyversions/pytest-django.svg :alt: Supported Python versions :target: https://pypi.python.org/pypi/pytest-django

… image:: https://github.com/pytest-dev/pytest-django/workflows/main/badge.svg :alt: Build Status :target: https://github.com/pytest-dev/pytest-django/actions

… image:: https://img.shields.io/pypi/djversions/pytest-django.svg :alt: Supported Django versions :target: https://pypi.org/project/pytest-django/

… image:: https://img.shields.io/codecov/c/github/pytest-dev/pytest-django.svg?style=flat :alt: Coverage :target: https://codecov.io/gh/pytest-dev/pytest-django

Welcome to pytest-django!

pytest-django allows you to test your Django project/applications with the pytest testing tool <https://pytest.org/>_.

  • Quick start / tutorial <https://pytest-django.readthedocs.io/en/latest/tutorial.html>_

  • Changelog <https://pytest-django.readthedocs.io/en/latest/changelog.html>_

  • Full documentation: https://pytest-django.readthedocs.io/en/latest/

  • Contribution docs <https://pytest-django.readthedocs.io/en/latest/contributing.html>_

  • Version compatibility:

    • Django: 5.2, 6.1 and latest main branch (compatible at the time of each release)
    • Python: CPython>=3.10 or PyPy 3
    • pytest: >=7.0

    For compatibility with older versions, use previous pytest-django releases.

  • Licence: BSD

  • All contributors <https://github.com/pytest-dev/pytest-django/contributors>_

  • GitHub repository: https://github.com/pytest-dev/pytest-django

  • Issue tracker <https://github.com/pytest-dev/pytest-django/issues>_

  • Python Package Index (PyPI) <https://pypi.python.org/pypi/pytest-django/>_

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. <https://pytest.org/en/latest/how-to/fixtures.html>_
  • 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 <https://pytest.org/en/latest/how-to/plugins.html>_.
  • Works with both worlds: Existing unittest-style TestCase’s still work without any modifications.

See the pytest documentation <https://pytest.org/en/latest/>_ for more information on pytest itself.

评论

暂无评论