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 1515VNCSERVER = 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
You can’t perform that action at this time.
0 commit comments