@@ -42,21 +42,21 @@ def test_normalize_in_make_grid(self):
42
42
self .assertTrue (torch .equal (norm_max , rounded_grid_max ), 'Normalized max is not equal to 1' )
43
43
self .assertTrue (torch .equal (norm_min , rounded_grid_min ), 'Normalized min is not equal to 0' )
44
44
45
- @unittest .skipIf ('win' in sys .platform , 'temporarily disabled on Windows' )
45
+ @unittest .skipIf (sys .platform in ( 'win32' , 'cygwin' ) , 'temporarily disabled on Windows' )
46
46
def test_save_image (self ):
47
47
with tempfile .NamedTemporaryFile (suffix = '.png' ) as f :
48
48
t = torch .rand (2 , 3 , 64 , 64 )
49
49
utils .save_image (t , f .name )
50
50
self .assertTrue (os .path .exists (f .name ), 'The image is not present after save' )
51
51
52
- @unittest .skipIf ('win' in sys .platform , 'temporarily disabled on Windows' )
52
+ @unittest .skipIf (sys .platform in ( 'win32' , 'cygwin' ) , 'temporarily disabled on Windows' )
53
53
def test_save_image_single_pixel (self ):
54
54
with tempfile .NamedTemporaryFile (suffix = '.png' ) as f :
55
55
t = torch .rand (1 , 3 , 1 , 1 )
56
56
utils .save_image (t , f .name )
57
57
self .assertTrue (os .path .exists (f .name ), 'The pixel image is not present after save' )
58
58
59
- @unittest .skipIf ('win' in sys .platform , 'temporarily disabled on Windows' )
59
+ @unittest .skipIf (sys .platform in ( 'win32' , 'cygwin' ) , 'temporarily disabled on Windows' )
60
60
def test_save_image_file_object (self ):
61
61
with tempfile .NamedTemporaryFile (suffix = '.png' ) as f :
62
62
t = torch .rand (2 , 3 , 64 , 64 )
@@ -68,7 +68,7 @@ def test_save_image_file_object(self):
68
68
self .assertTrue (torch .equal (F .to_tensor (img_orig ), F .to_tensor (img_bytes )),
69
69
'Image not stored in file object' )
70
70
71
- @unittest .skipIf ('win' in sys .platform , 'temporarily disabled on Windows' )
71
+ @unittest .skipIf (sys .platform in ( 'win32' , 'cygwin' ) , 'temporarily disabled on Windows' )
72
72
def test_save_image_single_pixel_file_object (self ):
73
73
with tempfile .NamedTemporaryFile (suffix = '.png' ) as f :
74
74
t = torch .rand (1 , 3 , 1 , 1 )
0 commit comments