跳转到主要内容

使用pytest测试RST文档中的测试代码

项目描述

Actions Latest Version https://img.shields.io/pypi/wheel/pytest-rst.svg https://img.shields.io/pypi/pyversions/pytest-rst.svg https://img.shields.io/pypi/l/pytest-rst.svg

pytest-rst在ReStructuredText中运行Python测试

代码块必须具有以:name:属性开始的test_

示例

此块将作为pytest测试用例运行

.. code-block:: python
    :name: test_first

    assert True
assert True

此块不会运行

.. code-block:: python

    # not a test
    assert False
# not a test
assert False

版本控制

此软件遵循语义版本控制

项目详情


下载文件

下载适合您平台的应用程序。如果您不确定要选择哪个,请了解有关安装包的更多信息。

源代码分布

pytest_rst-0.1.5.tar.gz (3.6 kB 查看哈希)

上传于 源代码

构建分发

pytest_rst-0.1.5-py3-none-any.whl (4.5 kB 查看哈希值)

上传于 Python 3

由以下支持