Skip to content

Commit

Permalink
[fbsync] Skip jpeg encoding/decoding tests on MacOS (#8145)
Browse files Browse the repository at this point in the history
Reviewed By: vmoens

Differential Revision: D52539015

fbshipit-source-id: 77897ef7616da523e9a5eac0447d22cdc281d86e
  • Loading branch information
NicolasHug authored and facebook-github-bot committed Jan 16, 2024
1 parent b0ff741 commit 08928d8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/test_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
INTERLACED_PNG = os.path.join(IMAGE_ROOT, "interlaced_png")
TOOSMALL_PNG = os.path.join(IMAGE_ROOT, "toosmall_png")
IS_WINDOWS = sys.platform in ("win32", "cygwin")
IS_MACOS = sys.platform == "darwin"
PILLOW_VERSION = tuple(int(x) for x in PILLOW_VERSION.split("."))


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


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


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

0 comments on commit 08928d8

Please sign in to comment.