From 86b251f40e4c5157282da2f7be5e903416e9db2c Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Wed, 19 Mar 2025 20:40:29 +1100 Subject: [PATCH] Simplified code --- Tests/test_file_jpeg.py | 2 +- Tests/test_image.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Tests/test_file_jpeg.py b/Tests/test_file_jpeg.py index c316a1dd8..c7da07caf 100644 --- a/Tests/test_file_jpeg.py +++ b/Tests/test_file_jpeg.py @@ -764,7 +764,7 @@ class TestFileJpeg: img = Image.new(mode, (20, 20)) img.save(out, "JPEG", convert_mode=True) - temp_file = str(tmp_path / "temp.jpg") + temp_file = tmp_path / "temp.jpg" with Image.open("Tests/images/pil123rgba.png") as img: img.save(temp_file, convert_mode=True, fill_color="red") diff --git a/Tests/test_image.py b/Tests/test_image.py index 3e90c5801..ea8b957ac 100644 --- a/Tests/test_image.py +++ b/Tests/test_image.py @@ -507,7 +507,7 @@ class TestImage: def test_no_supported_modes_method(self, tmp_path: Path) -> None: assert not hasattr(TiffImagePlugin, "_supported_modes") - temp_file = str(tmp_path / "temp.tiff") + temp_file = tmp_path / "temp.tiff" im = hopper() im.save(temp_file, convert_mode=True)