Unverified Commit b9e9c28f authored by vfdev's avatar vfdev Committed by GitHub
Browse files

Added missing assert (#6446)

parent 97bb6cb1
......@@ -793,7 +793,7 @@ class TestRandomColorOp:
if p > 0.0:
fn.assert_called_once_with(inpt, **kwargs)
else:
fn.call_count == 0
assert fn.call_count == 0
class TestRandomPerspective:
......@@ -1014,7 +1014,7 @@ class TestRandomErasing:
if p > 0.0:
fn.assert_called_once_with(erase_image_tensor_inpt, **params)
else:
fn.call_count == 0
assert fn.call_count == 0
class TestTransform:
......@@ -1050,7 +1050,7 @@ class TestToImageTensor:
transform = transforms.ToImageTensor()
transform(inpt)
if inpt_type in (features.BoundingBox, str, int):
fn.call_count == 0
assert fn.call_count == 0
else:
fn.assert_called_once_with(inpt, copy=transform.copy)
......@@ -1067,7 +1067,7 @@ class TestToImagePIL:
transform = transforms.ToImagePIL()
transform(inpt)
if inpt_type in (features.BoundingBox, str, int):
fn.call_count == 0
assert fn.call_count == 0
else:
fn.assert_called_once_with(inpt, copy=transform.copy)
......@@ -1085,7 +1085,7 @@ class TestToPILImage:
transform = transforms.ToPILImage()
transform(inpt)
if inpt_type in (PIL.Image.Image, features.BoundingBox, str, int):
fn.call_count == 0
assert fn.call_count == 0
else:
fn.assert_called_once_with(inpt, mode=transform.mode)
......@@ -1103,7 +1103,7 @@ class TestToTensor:
transform = transforms.ToTensor()
transform(inpt)
if inpt_type in (features.Image, torch.Tensor, features.BoundingBox, str, int):
fn.call_count == 0
assert fn.call_count == 0
else:
fn.assert_called_once_with(inpt)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment