Skip to content

Commit 08928d8

Browse files
NicolasHugfacebook-github-bot
authored andcommitted
[fbsync] Skip jpeg encoding/decoding tests on MacOS (#8145)
Reviewed By: vmoens Differential Revision: D52539015 fbshipit-source-id: 77897ef7616da523e9a5eac0447d22cdc281d86e
1 parent b0ff741 commit 08928d8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/test_image.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
INTERLACED_PNG = os.path.join(IMAGE_ROOT, "interlaced_png")
3535
TOOSMALL_PNG = os.path.join(IMAGE_ROOT, "toosmall_png")
3636
IS_WINDOWS = sys.platform in ("win32", "cygwin")
37+
IS_MACOS = sys.platform == "darwin"
3738
PILLOW_VERSION = tuple(int(x) for x in PILLOW_VERSION.split("."))
3839

3940

@@ -419,6 +420,7 @@ def test_encode_jpeg_errors():
419420
encode_jpeg(torch.empty((100, 100), dtype=torch.uint8))
420421

421422

423+
@pytest.mark.skipif(IS_MACOS, reason="https://github.com/pytorch/vision/issues/8031")
422424
@pytest.mark.parametrize(
423425
"img_path",
424426
[pytest.param(jpeg_path, id=_get_safe_image_name(jpeg_path)) for jpeg_path in get_images(ENCODE_JPEG, ".jpg")],
@@ -437,6 +439,7 @@ def test_encode_jpeg(img_path):
437439
assert_equal(encoded_jpeg_torch, encoded_jpeg_pil)
438440

439441

442+
@pytest.mark.skipif(IS_MACOS, reason="https://github.com/pytorch/vision/issues/8031")
440443
@pytest.mark.parametrize(
441444
"img_path",
442445
[pytest.param(jpeg_path, id=_get_safe_image_name(jpeg_path)) for jpeg_path in get_images(ENCODE_JPEG, ".jpg")],

0 commit comments

Comments
 (0)