Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding option to pytest to skip regression tests #2350

Merged
merged 1 commit into from
Sep 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,12 @@ def pytest_addoption(parser):
default=False,
help="run only GUI tests",
)
parser.addoption(
"--skip-regression-check",
action="store_true",
default=False,
help="Avoid checking the image regression check in all tests",
)


def pytest_collection_modifyitems(config, items):
Expand Down Expand Up @@ -202,7 +208,10 @@ def pytest_collection_modifyitems(config, items):


@pytest.fixture(autouse=True)
def wrapped_verify_image_cache(verify_image_cache):
def wrapped_verify_image_cache(verify_image_cache, pytestconfig):
skip_regression_check = pytestconfig.option.skip_regression_check
if skip_regression_check:
verify_image_cache.skip = True
return verify_image_cache


Expand Down
Loading