Skip to main content

pytest plugin for add priority for tests

Project description

Pytest-Priority

为用例添加优先级标记,并支持按优先级筛选用例执行

安装方法

pip install pytest-priority

使用方法

  1. 标记优先级
# 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
  1. 筛选测试用例,例如运行优先级为p0和p1的用例
pytest test_demo.py --priority=p0 --priority=p1

Project details


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)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page