Skip to content

Commit

Permalink
Added tests for unimplemented bitcount
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Oct 28, 2023
1 parent 0051fc9 commit 17be898
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
Binary file added Tests/images/unsupported_bitcount_luminance.dds
Binary file not shown.
Binary file added Tests/images/unsupported_bitcount_rgb.dds
Binary file not shown.
15 changes: 13 additions & 2 deletions Tests/test_file_dds.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,19 @@ def test_palette():
@pytest.mark.parametrize(
"test_file",
(
"Tests/images/unknown_fourcc.dds",
"Tests/images/unimplemented_fourcc.dds",
"Tests/images/unsupported_bitcount_rgb.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_pfflags.dds",
),
Expand Down

0 comments on commit 17be898

Please sign in to comment.