File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 1515log_level = WARNING
1616markers =
1717 installation: test requires installation of dependencies
18+ diagnostic_image_output: test produces images that will be compared with imagehash
1819
1920[coverage:run]
2021parallel = true
Original file line number Diff line number Diff line change 11"""Configure pytest."""
22
3+ import sys
4+
5+ import pytest
6+
37
48def pytest_addoption (parser ):
59 """Add option to save imagehashes (used for diagnostic tests)."""
610 parser .addoption ("--save_imagehashes" )
11+
12+
13+ def pytest_runtest_setup (item ):
14+ """Only run diagnostic tests that produce images on Linux machines."""
15+ if item .get_closest_marker ("diagnostic_image_output" ) is not None :
16+ platform = sys .platform
17+ if platform != "linux" :
18+ pytest .skip (
19+ f"Diagnostic tests that produce images are not supported on "
20+ f"platform { platform } "
21+ )
You can’t perform that action at this time.
0 commit comments