changeset 346:a56cbcbacfde

fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 19 Oct 2020 19:18:13 +0200
parents 4d3b797aa5ae
children c56eaf5928f0
files Plugins/DicomWeb/Run.py
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
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: