pytest plugin for add priority for tests
Project description
Pytest-Priority
为用例添加优先级标记,并支持按优先级筛选用例执行
安装方法
pip install pytest-priority
使用方法
- 标记优先级
# test_demo.py
import pytest
@pytest.mark.priority('p0')
def test_a():
pass
@pytest.mark.priority('p1')
def test_b():
pass
@pytest.mark.priority('p2')
def test_c():
pass
- 筛选测试用例,例如运行优先级为p0和p1的用例
pytest test_demo.py --priority=p0 --priority=p1
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pytest_priority-0.1.1.tar.gz
(2.1 kB
view hashes)