From b78cd4f320f7abe7250f797ca848873f309f6329 Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Fri, 6 Aug 2021 09:44:32 +0100 Subject: [PATCH] Check individual calls --- test/test_transforms_video.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/test_transforms_video.py b/test/test_transforms_video.py index 1b6b85a29ba..2cf7831b755 100644 --- a/test/test_transforms_video.py +++ b/test/test_transforms_video.py @@ -132,12 +132,16 @@ def test_to_tensor_video(self): with pytest.raises(TypeError): trans(np.random.rand(numFrames, height, width, 1).tolist()) + with pytest.raises(TypeError): trans(torch.rand((numFrames, height, width, 1), dtype=torch.float)) with pytest.raises(ValueError): trans(torch.ones((3, numFrames, height, width, 3), dtype=torch.uint8)) + with pytest.raises(ValueError): trans(torch.ones((height, width, 3), dtype=torch.uint8)) + with pytest.raises(ValueError): trans(torch.ones((width, 3), dtype=torch.uint8)) + with pytest.raises(ValueError): trans(torch.ones((3), dtype=torch.uint8)) trans.__repr__()