Skip to content

Commit

Permalink
Merge pull request #9 from radarhere/test_open
Browse files Browse the repository at this point in the history
Removed test_open
  • Loading branch information
REDxEYE authored Oct 30, 2023
2 parents e0a726b + c7fbfdc commit 2f7caad
Show file tree
Hide file tree
Showing 9 changed files with 1 addition and 16 deletions.
Binary file removed Tests/images/mode-l.dds
Binary file not shown.
Binary file removed Tests/images/mode-la.dds
Binary file not shown.
Binary file removed Tests/images/mode-la.png
Binary file not shown.
Binary file removed Tests/images/mode-rgb.dds
Binary file not shown.
Binary file removed Tests/images/mode-rgb.png
Binary file not shown.
Binary file removed Tests/images/mode-rgba.dds
Binary file not shown.
Binary file removed Tests/images/mode-rgba.png
Binary file not shown.
File renamed without changes
17 changes: 1 addition & 16 deletions Tests/test_file_dds.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,25 +350,10 @@ def test_save_unsupported_mode(tmp_path):
im.save(out)


@pytest.mark.parametrize(
("mode", "test_file"),
(
("L", "Tests/images/mode-l.dds"),
("LA", "Tests/images/mode-la.dds"),
("RGB", "Tests/images/mode-rgb.dds"),
("RGBA", "Tests/images/mode-rgba.dds"),
),
)
def test_open(mode, test_file):
with Image.open(test_file) as im:
assert im.mode == mode
assert_image_equal_tofile(im, test_file.replace(".dds", ".png"))


def test_open_rgb8():
with Image.open("Tests/images/rgb8.dds") as im:
assert im.mode == "L"
assert_image_equal_tofile(im, "Tests/images/mode-l.png")
assert_image_equal_tofile(im, "Tests/images/rgb8.png")


@pytest.mark.parametrize(
Expand Down

0 comments on commit 2f7caad

Please sign in to comment.