@@ -3758,12 +3758,18 @@ def test_transform_errors_warnings(self):
37583758 with pytest .raises (ValueError , match = "provide only two dimensions" ):
37593759 transforms .RandomResizedCrop (size = (1 , 2 , 3 ))
37603760
3761- with pytest .raises (TypeError , match = "Scale should be a sequence" ):
3761+ with pytest .raises (TypeError , match = "Scale should be a sequence of two floats. " ):
37623762 transforms .RandomResizedCrop (size = self .INPUT_SIZE , scale = 123 )
37633763
3764- with pytest .raises (TypeError , match = "Ratio should be a sequence" ):
3764+ with pytest .raises (TypeError , match = "Ratio should be a sequence of two floats. " ):
37653765 transforms .RandomResizedCrop (size = self .INPUT_SIZE , ratio = 123 )
37663766
3767+ with pytest .raises (TypeError , match = "Ratio should be a sequence of two floats." ):
3768+ transforms .RandomResizedCrop (size = self .INPUT_SIZE , ratio = [1 , 2 , 3 ])
3769+
3770+ with pytest .raises (TypeError , match = "Scale should be a sequence of two floats." ):
3771+ transforms .RandomResizedCrop (size = self .INPUT_SIZE , scale = [1 , 2 , 3 ])
3772+
37673773 for param in ["scale" , "ratio" ]:
37683774 with pytest .warns (match = "Scale and ratio should be of kind" ):
37693775 transforms .RandomResizedCrop (size = self .INPUT_SIZE , ** {param : [1 , 0 ]})
0 commit comments