Added tests for unimplemented bitcount

This commit is contained in:
Andrew Murray 2023-10-28 16:58:57 +11:00
parent 0051fc9cf8
commit 17be898fc4
3 changed files with 13 additions and 2 deletions

Binary file not shown.

Binary file not shown.

View File

@ -306,8 +306,19 @@ def test_palette():
@pytest.mark.parametrize( @pytest.mark.parametrize(
"test_file", "test_file",
( (
"Tests/images/unknown_fourcc.dds", "Tests/images/unsupported_bitcount_rgb.dds",
"Tests/images/unimplemented_fourcc.dds", "Tests/images/unsupported_bitcount_luminance.dds",
),
)
def test_unsupported_bitcount(test_file):
with pytest.raises(OSError):
with Image.open(test_file):
pass
@pytest.mark.parametrize(
"test_file",
(
"Tests/images/unimplemented_dxgi_format.dds", "Tests/images/unimplemented_dxgi_format.dds",
"Tests/images/unimplemented_pfflags.dds", "Tests/images/unimplemented_pfflags.dds",
), ),