Exemple #1
0
def pytest_collection_modifyitems(config, items):
    if not config.getoption("--skip_slow"):
        return
    else:
        slow_skip = pytest.mark.skip(
            reason="Slow test skipped due to --disable_slow flag.")
        for item in items:
            if "slow" in item.keywords:
                item.add_marker(slow_skip)
Exemple #2
0
def pytest_collection_modifyitems(config, items):
    if not config.getoption("--skip_end_to_end"):
        return
    else:
        skip_end_to_end = pytest.mark.skip(
            reason="End to end test skipped due to --skip_end_to_end flag")
        for item in items:
            if "skip_end_to_end" in item.keywords:
                item.add_marker(skip_end_to_end)