跳转到主要内容

未知

项目描述

Pytest-Marks
============

在pytest测试方法上设置'marks'的功能相当酷。

@pytest.mark.red
def some_test_method(self)
# 一些检查-y的东西

但如果您想在方法上添加五六种marks,它就会变得有点糟糕。

@pytest.mark.red
@pytest.mark.green
@pytest.mark.blue
@pytest.mark.black
@pytest.mark.orange
@pytest.mark.pink
def some_test_method(self)
# 一些检查-y的东西

如果可以一次性应用它们会更好。

@pytest.marks('red', 'green', 'blue', 'black', 'orange', 'pink')
def some_test_method(self)
# 一些检查-y的东西

现在您可以做到了。

要安装,请执行以下操作之一
* pip install pytest-marks
* python setup.py install

支持者