跳转到主要内容

pytest手动测试标记

项目描述

pytest-manual-marker

pytest手动测试标记。添加了收集手动、自动(默认)或两者的选项。

为手动测试添加不同的测试结果。

用法

# content of test_manual.py
import pytest

@pytest.mark.manual
def test_manual():
    """this needs a opt in and will report manual as test status"""

def test_automated():
    """this is a empty test just for shows"""

仅收集手动测试

$ pytest --collect-only -q --manual
test_manual.py::test_manual

1/2 tests collected (1 deselected) in 0.00s

仅收集自动测试

$ pytest --collect-only -q
test_manual.py::test_automated

1/2 tests collected (1 deselected) in 0.00s

收集手动和自动测试

$ pytest --collect-only -q --include-manual  # collect both manual and automated tests
test_manual.py::test_manual
test_manual.py::test_automated

2 tests collected in 0.00s

安装

安装此插件:

! pip install pytest-manual-marker

项目详情


下载文件

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

源分布

pytest_manual_marker-2.0.0.0.tar.gz (2.5 kB 查看哈希值)

上传时间: 源代码

构建版本

pytest_manual_marker-2.0.0.0-py3-none-any.whl (2.6 kB 查看哈希值)

上传时间: Python 3

由以下支持