From 896b249834c113470bf9355a8c72e2aba9f3fe88 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Fri, 27 Jun 2025 21:19:47 +1000 Subject: [PATCH] Added additional test case --- Tests/test_file_dds.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Tests/test_file_dds.py b/Tests/test_file_dds.py index 12be1056e..866220800 100644 --- a/Tests/test_file_dds.py +++ b/Tests/test_file_dds.py @@ -512,17 +512,19 @@ def test_save_dx10_bc5(tmp_path: Path) -> None: with pytest.raises(OSError, match="only RGB mode can be written as BC5"): im.save(out, pixel_format="BC5") + @pytest.mark.parametrize( "pixel_format, mode", ( - ('DXT1', 'RGBA'), - ('DXT3', 'RGBA'), - ('BC2', 'RGBA'), - ('BC3', 'RGBA'), - ('BC5', 'RGB'), + ("DXT1", "RGBA"), + ("DXT3", "RGBA"), + ("DXT5", "RGBA"), + ("BC2", "RGBA"), + ("BC3", "RGBA"), + ("BC5", "RGB"), ), ) def test_save_large_file(tmp_path: Path, pixel_format: str, mode: str) -> None: - with hopper(mode).resize((440,440)) as im: + with hopper(mode).resize((440, 440)) as im: # should not error in valgrind - im.save(tmp_path / 'img.dds', 'DDS', pixel_format=pixel_format) + im.save(tmp_path / "img.dds", "DDS", pixel_format=pixel_format)