Skip to content

Commit

Permalink
More robust check in tests for 16 bits images
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasHug committed Mar 21, 2022
1 parent fc63f82 commit 091dfcd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/test_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def test_decode_png(img_path, pil_mode, mode):

img_pil = normalize_dimensions(img_pil)

if "16" in img_path:
if img_path.endswith("16.png"):
# 16 bits image decoding is supported, but only as a private API
# FIXME: see https://github.com/pytorch/vision/issues/4731 for potential solutions to making it public
with pytest.raises(RuntimeError, match="At most 8-bit PNG images are supported"):
Expand Down

0 comments on commit 091dfcd

Please sign in to comment.