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 details)

Uploaded Source

File details

Details for the file pytest_priority-0.1.1.tar.gz.

File metadata

  • Download URL: pytest_priority-0.1.1.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.6

File hashes

Hashes for pytest_priority-0.1.1.tar.gz
Algorithm Hash digest
SHA256 86fa9c95a26b90f1f086529a9f10ca2f3d7185f3c9c17897b53719f2945a59c9
MD5 f9b57bcd541e79b8d383dd81b4bcd783
BLAKE2b-256 fa444d37033f685809b9c5982ab55d85992aa3de0d0c444b84bfee0724a7ff88

See more details on using hashes here.

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