Skip to content

Commit ad1ff33

Browse files
NicolasHugfacebook-github-bot
authored andcommitted
[fbsync] Added missing assert (#6446)
Reviewed By: datumbox Differential Revision: D39013668 fbshipit-source-id: d8661107e2af465243c73d86a265bd396327445c
1 parent cc92d6b commit ad1ff33

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/test_prototype_transforms.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -793,7 +793,7 @@ def test__transform(self, p, transform_cls, func_op_name, kwargs, mocker):
793793
if p > 0.0:
794794
fn.assert_called_once_with(inpt, **kwargs)
795795
else:
796-
fn.call_count == 0
796+
assert fn.call_count == 0
797797

798798

799799
class TestRandomPerspective:
@@ -1014,7 +1014,7 @@ def test__transform(self, p, inpt_type, mocker):
10141014
if p > 0.0:
10151015
fn.assert_called_once_with(erase_image_tensor_inpt, **params)
10161016
else:
1017-
fn.call_count == 0
1017+
assert fn.call_count == 0
10181018

10191019

10201020
class TestTransform:
@@ -1050,7 +1050,7 @@ def test__transform(self, inpt_type, mocker):
10501050
transform = transforms.ToImageTensor()
10511051
transform(inpt)
10521052
if inpt_type in (features.BoundingBox, str, int):
1053-
fn.call_count == 0
1053+
assert fn.call_count == 0
10541054
else:
10551055
fn.assert_called_once_with(inpt, copy=transform.copy)
10561056

@@ -1067,7 +1067,7 @@ def test__transform(self, inpt_type, mocker):
10671067
transform = transforms.ToImagePIL()
10681068
transform(inpt)
10691069
if inpt_type in (features.BoundingBox, str, int):
1070-
fn.call_count == 0
1070+
assert fn.call_count == 0
10711071
else:
10721072
fn.assert_called_once_with(inpt, copy=transform.copy)
10731073

@@ -1085,7 +1085,7 @@ def test__transform(self, inpt_type, mocker):
10851085
transform = transforms.ToPILImage()
10861086
transform(inpt)
10871087
if inpt_type in (PIL.Image.Image, features.BoundingBox, str, int):
1088-
fn.call_count == 0
1088+
assert fn.call_count == 0
10891089
else:
10901090
fn.assert_called_once_with(inpt, mode=transform.mode)
10911091

@@ -1103,7 +1103,7 @@ def test__transform(self, inpt_type, mocker):
11031103
transform = transforms.ToTensor()
11041104
transform(inpt)
11051105
if inpt_type in (features.Image, torch.Tensor, features.BoundingBox, str, int):
1106-
fn.call_count == 0
1106+
assert fn.call_count == 0
11071107
else:
11081108
fn.assert_called_once_with(inpt)
11091109

0 commit comments

Comments
 (0)