From b1f741d136719ad1ac649312545c9f37f3c833c9 Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Fri, 10 Mar 2023 09:38:06 +0000 Subject: [PATCH 1/2] Fix lint --- test/test_image.py | 1 - 1 file changed, 1 deletion(-) diff --git a/test/test_image.py b/test/test_image.py index f71e023c4ae..346167e501b 100644 --- a/test/test_image.py +++ b/test/test_image.py @@ -371,7 +371,6 @@ def test_decode_jpeg_cuda(mode, img_path, scripted): @needs_cuda def test_decode_image_cuda_raises(): data = torch.randint(0, 127, size=(255,), device="cuda", dtype=torch.uint8) - exception_raised = True with pytest.raises(RuntimeError): decode_image(data) From c8f5016269accfea8d7492f054dd638f5911da3b Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Fri, 10 Mar 2023 09:55:26 +0000 Subject: [PATCH 2/2] fixm ore --- test/test_image.py | 1 + 1 file changed, 1 insertion(+) diff --git a/test/test_image.py b/test/test_image.py index 346167e501b..4c210ea7eef 100644 --- a/test/test_image.py +++ b/test/test_image.py @@ -368,6 +368,7 @@ def test_decode_jpeg_cuda(mode, img_path, scripted): # Some difference expected between jpeg implementations assert (img.float() - img_nvjpeg.cpu().float()).abs().mean() < 2 + @needs_cuda def test_decode_image_cuda_raises(): data = torch.randint(0, 127, size=(255,), device="cuda", dtype=torch.uint8)