Skip to main content

pytest-custom-scheduling: pytest plugin

Rewrite pytest-xdist pytest_xdist_make_scheduler function, Modify load scheduling.

Support custom grouping.

install

pip install pytest-custom-scheduling

Usage

command line:pytest --switch={on:off} -n=auto

tip: pytest-xdist must be turned on

options:
  • switch: Used to open plugin, default “off”

Use {...} as a marker custom grouping.

Demo

import pytest


@pytest.mark.parametrize("group",
                         ["group_1", "group_2", "group_3", "group_4", "group_5", "group_6",
                          "group_7", "group_8", "group_9", "group_10", "group_11", "group_12"],
                         ids=["group_1{group_1}", "group_2{group_2}", "group_3{group_3}",
                              "group_4{group_4}", "group_5{group_5}", "group_6{group_6}",
                              "group_7{group_7}", "group_8{group_8}", "group_9{group_9}",
                              "group_10{group_10}", "group_11{group_11}", "group_12{group_12}"])

@pytest.mark.parametrize("group", ["group_4", "group_5", "group_6"],
                         ids=["group_4{group_5}", "group_5{group_5}", "group_6{group_5}"])
def test_05(group):
    a = "hello"
    b = "world"
    assert a == b

cmd line: pytest --switch=on -n=auto

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytest-custom-scheduling-1.0.tar.gz (2.8 kB view details)

Uploaded Source

File details

Details for the file pytest-custom-scheduling-1.0.tar.gz.

File metadata

  • Download URL: pytest-custom-scheduling-1.0.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.7.0

File hashes

Hashes for pytest-custom-scheduling-1.0.tar.gz
Algorithm Hash digest
SHA256 6e2ff1b83668a16d9aa554521578a9708f6f1930b0b966805f42b6c1d9fa783d
MD5 11c165b8a92cc7ef166daeedf65dec63
BLAKE2b-256 358652cbd02699e2ec03eaaf027b4af002105e4ae26d6cb310e83a6d1c73bdfc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page