Merge pull request #893 from j9ac9k/fix-qt5-pxCount

PySide2 is also a Qt5 binding
This commit is contained in:
Thomas A Caswell 2019-05-25 20:19:12 -04:00 committed by GitHub
commit f2909e0cfb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -253,7 +253,7 @@ def assertImageMatch(im1, im2, minCorr=None, pxThreshold=50.,
assert im1.dtype == im2.dtype assert im1.dtype == im2.dtype
if pxCount == -1: if pxCount == -1:
if QT_LIB == 'PyQt5': if QT_LIB in {'PyQt5', 'PySide2'}:
# Qt5 generates slightly different results; relax the tolerance # Qt5 generates slightly different results; relax the tolerance
# until test images are updated. # until test images are updated.
pxCount = int(im1.shape[0] * im1.shape[1] * 0.01) pxCount = int(im1.shape[0] * im1.shape[1] * 0.01)