File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 15
15
VNCSERVER = getenv ("VNCSERVER" )
16
16
17
17
18
- def compare_screenshot (test_image , threshold = 2 ):
18
+ def compare_screenshot (test_image ):
19
19
# Compare images by calculating the mean absolute difference
20
20
# Images must be the same size
21
21
# threshold: Average difference per pixel, this depends on the image type
22
22
# e.g. for 24 bit images (8 bit RGB pixels) threshold=1 means a maximum
23
23
# difference of 1 bit per pixel per channel
24
24
reference = Image .open (HERE / "reference" / "desktop.png" )
25
+ threshold = 2
25
26
if VNCSERVER == "turbovnc" :
26
27
reference = Image .open (HERE / "reference" / "desktop-turbovnc.png" )
28
+ # The TurboVNC screenshot varies a lot more than TigerVNC
29
+ threshold = 6
27
30
test = Image .open (test_image )
28
31
29
32
# Absolute difference
You can’t perform that action at this time.
0 commit comments