Skip to content

Commit b137b9c

Browse files
committed
TurboVNC screenshot is a lot more variable
1 parent f5a1fb0 commit b137b9c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/test_browser.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,18 @@
1515
VNCSERVER = getenv("VNCSERVER")
1616

1717

18-
def compare_screenshot(test_image, threshold=2):
18+
def compare_screenshot(test_image):
1919
# Compare images by calculating the mean absolute difference
2020
# Images must be the same size
2121
# threshold: Average difference per pixel, this depends on the image type
2222
# e.g. for 24 bit images (8 bit RGB pixels) threshold=1 means a maximum
2323
# difference of 1 bit per pixel per channel
2424
reference = Image.open(HERE / "reference" / "desktop.png")
25+
threshold = 2
2526
if VNCSERVER == "turbovnc":
2627
reference = Image.open(HERE / "reference" / "desktop-turbovnc.png")
28+
# The TurboVNC screenshot varies a lot more than TigerVNC
29+
threshold = 6
2730
test = Image.open(test_image)
2831

2932
# Absolute difference

0 commit comments

Comments
 (0)