Skip to content

Commit

Permalink
test: normalization color space screenshots
Browse files Browse the repository at this point in the history
  • Loading branch information
Apkawa committed Dec 31, 2024
1 parent ed4bd8a commit dcc4079
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ splinter>=0.21,<0.22
#chromedriver-binary-auto
diffimg==0.2.3
#mypy>=0.901
pytest-image-diff>=0.0.2
pytest-image-diff>=0.0.14
# Docs
recommonmark
Sphinx
Expand Down
12 changes: 11 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ def image_diff_threshold():
return 0.05


@pytest.fixture(scope="session")
def image_diff_color_mode():
"""
Normalize color mode. RGB, RGBA, None. Default None - do nothing
"""
return "RGB"


@pytest.fixture(scope="function")
def temp_file():
temp_files = []
Expand Down Expand Up @@ -50,9 +58,11 @@ def splinter_driver_kwargs(request, splinter_webdriver):
executable = request.config.option.splinter_webdriver_executable
if not executable:
from chromedriver_binary import chromedriver_filename

executable = chromedriver_filename
from selenium.webdriver.chrome.service import Service
kw['service'] = Service(executable_path=executable)

kw["service"] = Service(executable_path=executable)
return kw


Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/screenshots/tests.test_image/test_image--reference.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit dcc4079

Please sign in to comment.