@@ -793,7 +793,7 @@ def test__transform(self, p, transform_cls, func_op_name, kwargs, mocker):
793
793
if p > 0.0 :
794
794
fn .assert_called_once_with (inpt , ** kwargs )
795
795
else :
796
- fn .call_count == 0
796
+ assert fn .call_count == 0
797
797
798
798
799
799
class TestRandomPerspective :
@@ -1014,7 +1014,7 @@ def test__transform(self, p, inpt_type, mocker):
1014
1014
if p > 0.0 :
1015
1015
fn .assert_called_once_with (erase_image_tensor_inpt , ** params )
1016
1016
else :
1017
- fn .call_count == 0
1017
+ assert fn .call_count == 0
1018
1018
1019
1019
1020
1020
class TestTransform :
@@ -1050,7 +1050,7 @@ def test__transform(self, inpt_type, mocker):
1050
1050
transform = transforms .ToImageTensor ()
1051
1051
transform (inpt )
1052
1052
if inpt_type in (features .BoundingBox , str , int ):
1053
- fn .call_count == 0
1053
+ assert fn .call_count == 0
1054
1054
else :
1055
1055
fn .assert_called_once_with (inpt , copy = transform .copy )
1056
1056
@@ -1067,7 +1067,7 @@ def test__transform(self, inpt_type, mocker):
1067
1067
transform = transforms .ToImagePIL ()
1068
1068
transform (inpt )
1069
1069
if inpt_type in (features .BoundingBox , str , int ):
1070
- fn .call_count == 0
1070
+ assert fn .call_count == 0
1071
1071
else :
1072
1072
fn .assert_called_once_with (inpt , copy = transform .copy )
1073
1073
@@ -1085,7 +1085,7 @@ def test__transform(self, inpt_type, mocker):
1085
1085
transform = transforms .ToPILImage ()
1086
1086
transform (inpt )
1087
1087
if inpt_type in (PIL .Image .Image , features .BoundingBox , str , int ):
1088
- fn .call_count == 0
1088
+ assert fn .call_count == 0
1089
1089
else :
1090
1090
fn .assert_called_once_with (inpt , mode = transform .mode )
1091
1091
@@ -1103,7 +1103,7 @@ def test__transform(self, inpt_type, mocker):
1103
1103
transform = transforms .ToTensor ()
1104
1104
transform (inpt )
1105
1105
if inpt_type in (features .Image , torch .Tensor , features .BoundingBox , str , int ):
1106
- fn .call_count == 0
1106
+ assert fn .call_count == 0
1107
1107
else :
1108
1108
fn .assert_called_once_with (inpt )
1109
1109
0 commit comments