Mercurial > hg > orthanc-tests
diff Plugins/DicomWeb/Run.py @ 346:a56cbcbacfde
fix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 19 Oct 2020 19:18:13 +0200 |
parents | 4d3b797aa5ae |
children | 79ce0f7a9714 |
line wrap: on
line diff
--- a/Plugins/DicomWeb/Run.py Mon Oct 19 19:15:59 2020 +0200 +++ b/Plugins/DicomWeb/Run.py Mon Oct 19 19:18:13 2020 +0200 @@ -1379,12 +1379,13 @@ self.assertTrue(ImageChops.difference(im3, im5).getbbox() is None) self.assertTrue(ImageChops.difference(im4, im6).getbbox() is None) - # Tolerance of just 1 pixel of difference (needed on Windows) - #print(im2.getpixel((238,275))) # => 255 - #print(truth.getpixel((238,275))) # => 254 bbox = ImageChops.difference(im2, truth).getbbox() - self.assertLessEqual(abs(bbox[2] - bbox[0]), 1) - self.assertLessEqual(abs(bbox[3] - bbox[1]), 1) + if bbox != None: + # Tolerance of just 1 pixel of difference (needed on Windows) + #print(im2.getpixel((238,275))) # => 255 + #print(truth.getpixel((238,275))) # => 254 + self.assertLessEqual(abs(bbox[2] - bbox[0]), 1) + self.assertLessEqual(abs(bbox[3] - bbox[1]), 1) try: