Skip to content

Commit 446caef

Browse files
jdsgomesfacebook-github-bot
authored andcommitted
[fbsync] More robust check in tests for 16 bits images (#5652)
Summary: (Note: this ignores all push blocking failures!) Reviewed By: datumbox Differential Revision: D35216771 fbshipit-source-id: 50e27c56e7453c808af7ae34bb0cab9b4d778d75
1 parent 8f3d467 commit 446caef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/test_image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ def test_decode_png(img_path, pil_mode, mode):
158158

159159
img_pil = normalize_dimensions(img_pil)
160160

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

0 commit comments

Comments
 (0)