Tests: mark visual tests optional - #1997
Open
antirotor wants to merge 4 commits into
Open
Conversation
Running test locally will produce inconsistent errors about pixel deviation tolerances. Running them on Github Actions is more consistent and produce no errors as of now. Until we can figure out why the testing differences are so big on individual machines, we'll mark those tests optional. BREAKING CHANGE: UI visual tests are not running by default, you need to add optional tests using `--optional` argument.
antirotor
requested review from
iLLiCiTiT and
mahesh-ynput
and
a lite review from Copilot
August 12, 2026 12:47
Contributor
There was a problem hiding this comment.
Pull request overview
This PR makes UI visual regression tests opt-in for local runs (to avoid machine-specific pixel diff failures) while still running them in GitHub Actions for consistency.
Changes:
- Introduces a new
optionalpytest marker and excludes optional tests by default viapyproject.toml. - Marks visual UI tests as
optional, and updatesmanage.sh/manage.ps1to include them when--optionalis provided. - Updates CI workflow to run tests with
--optional, and ignores generatedtest_imagesoutputs.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/manage.sh | Adds --optional switch handling for test runs (marker expression changes). |
| tools/manage.ps1 | Adds --optional switch handling for test runs on Windows (marker expression changes). |
| tests/client/ayon_core/ui/test_visual.py | Marks visual regression tests as optional. |
| pyproject.toml | Registers optional marker and excludes it by default via pytest addopts. |
| .gitignore | Ignores test_images output directory created on visual test failures. |
| .github/workflows/pr_unittests.yaml | Runs CI tests with --optional to keep visual tests enabled on GitHub Actions. |
Suppressed comments (2)
tools/manage.sh:180
run-testscurrently checks for--optionalbut doesn't shift it out, and it also doesn't forward any remaining arguments topytest. This makes it impossible to pass through useful pytest flags (e.g.--force-regen,-k,-vv) without causingpytestto error once argument forwarding is added later. Consider shifting--optionalwhen present and forwarding the remaining args topytest.
local test_marker="not server and not optional"
if [ "$1" = "--optional" ]; then
test_marker="not server"
fi
uv sync --extra test
uv run pytest ./tests -m "$test_marker"
tools/manage.ps1:243
- Help output only documents
run-tests --optional, butrun-testswithout--optionalremains the default behavior. Consider listing both forms so users can discover how to run the default (non-optional) suite.
Write-Info -Text " run-tests --optional ", "Run ayon-core tests including optional tests" -Color White, Cyan
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: antirotor <33513211+antirotor@users.noreply.github.com>
iLLiCiTiT
reviewed
Aug 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog Description
Make visual test optional except on GH Action.
Additional info
Running test locally will produce inconsistent errors about pixel deviation tolerances. Running them on Github Actions is more consistent and produce no errors as of now. Until we can figure out why the testing differences are so big on individual machines, we'll mark those tests optional.
BREAKING CHANGE: UI visual tests are not running by default, you need to add optional tests using
--optionalargument.Testing notes:
Running tests using
./tools/manage.sh run-testsshould deselect failing visual tests.Running tests using
./tools/manage.sh run-tests --optionalshould a run visual tests.CI Action on Github should run them too.