@@ -85,6 +85,11 @@ def test_as_8_bit_BGR_image(self):
85
85
as_8_bit_BGR_image` definition unit tests methods.
86
86
"""
87
87
88
+ # Skipping unit test when "png" files are missing, e.g. when testing
89
+ # the distributed "Python" package.
90
+ if len (PNG_FILES ) > 0 :
91
+ return
92
+
88
93
image_i = read_image (PNG_FILES [0 ])
89
94
image_o = as_8_bit_BGR_image (image_i )
90
95
@@ -106,6 +111,11 @@ def test_adjust_image(self):
106
111
adjust_image` definition unit tests methods.
107
112
"""
108
113
114
+ # Skipping unit test when "png" files are missing, e.g. when testing
115
+ # the distributed "Python" package.
116
+ if len (PNG_FILES ) > 0 :
117
+ return
118
+
109
119
image = adjust_image (read_image (PNG_FILES [0 ]))
110
120
self .assertEqual (image .shape [1 ], WORKING_WIDTH )
111
121
@@ -180,6 +190,11 @@ def test_crop_and_level_image_with_rectangle(self):
180
190
crop_and_level_image_with_rectangle` definition unit tests methods.
181
191
"""
182
192
193
+ # Skipping unit test when "png" files are missing, e.g. when testing
194
+ # the distributed "Python" package.
195
+ if len (PNG_FILES ) > 0 :
196
+ return
197
+
183
198
image = as_8_bit_BGR_image (adjust_image (read_image (PNG_FILES [0 ])))
184
199
rectangle = (
185
200
(832.99865723 , 473.05020142 ),
@@ -205,6 +220,11 @@ def test_colour_checkers_coordinates_segmentation(self):
205
220
colour_checkers_coordinates_segmentation` definition unit tests methods.
206
221
"""
207
222
223
+ # Skipping unit test when "png" files are missing, e.g. when testing
224
+ # the distributed "Python" package.
225
+ if len (PNG_FILES ) > 0 :
226
+ return
227
+
208
228
# TODO: Unit test is only reproducible on "macOs", skipping other OSes.
209
229
if platform .system () in ('Windows' , 'Microsoft' , 'Linux' ):
210
230
return
@@ -490,6 +510,11 @@ def test_detect_colour_checkers_segmentation(self):
490
510
detect_colour_checkers_segmentation` definition unit tests methods.
491
511
"""
492
512
513
+ # Skipping unit test when "png" files are missing, e.g. when testing
514
+ # the distributed "Python" package.
515
+ if len (PNG_FILES ) > 0 :
516
+ return
517
+
493
518
# TODO: Unit test is only reproducible on "macOs", skipping other OSes.
494
519
if platform .system () in ('Windows' , 'Microsoft' , 'Linux' ):
495
520
return
0 commit comments