diff --git a/Tests/test_file_jpeg.py b/Tests/test_file_jpeg.py index 5bd16e356aa..15518756c1c 100644 --- a/Tests/test_file_jpeg.py +++ b/Tests/test_file_jpeg.py @@ -1,6 +1,5 @@ import os import re -import sys from io import BytesIO import pytest @@ -871,33 +870,6 @@ def test_getxmp(self): with Image.open("Tests/images/hopper.jpg") as im: assert im.getxmp() == {} - @pytest.mark.parametrize("buffer", (True, False)) - def test_save_stdout(self, buffer): - old_stdout = sys.stdout - - if buffer: - - class MyStdOut: - buffer = BytesIO() - - mystdout = MyStdOut() - else: - mystdout = BytesIO() - - sys.stdout = mystdout - - with Image.open(TEST_FILE) as im: - im.save(sys.stdout, "JPEG") - im_roundtrip = self.roundtrip(im) - - # Reset stdout - sys.stdout = old_stdout - - if buffer: - mystdout = mystdout.buffer - with Image.open(mystdout) as reloaded: - assert_image_equal(reloaded, im_roundtrip) - @pytest.mark.skipif(not is_win32(), reason="Windows only") @skip_unless_feature("jpg")