Skip to content

Commit 4469ee0

Browse files
committed
Test saving P4 images
1 parent eef4848 commit 4469ee0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Tests/test_file_ppm.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,13 @@ def test_16bit_pgm() -> None:
9292
assert_image_equal_tofile(im, "Tests/images/16_bit_binary_pgm.tiff")
9393

9494

95+
def test_p4_save(tmp_path: Path) -> None:
96+
with Image.open("Tests/images/hopper_1bit.pbm") as im:
97+
filename = tmp_path / "temp.pbm"
98+
im.save(filename)
99+
assert_image_equal_tofile(im, filename)
100+
101+
95102
def test_16bit_pgm_write(tmp_path: Path) -> None:
96103
with Image.open("Tests/images/16_bit_binary.pgm") as im:
97104
filename = tmp_path / "temp.pgm"

0 commit comments

Comments
 (0)