From c6249a5b76117ba89e1cc84cc1e2417aa63200ce Mon Sep 17 00:00:00 2001 From: wiredfool Date: Thu, 14 Mar 2013 15:45:44 -0700 Subject: [PATCH] Remove irrelevant test --- Tests/test_file_jpeg.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/Tests/test_file_jpeg.py b/Tests/test_file_jpeg.py index 39bff3373..011405501 100644 --- a/Tests/test_file_jpeg.py +++ b/Tests/test_file_jpeg.py @@ -162,22 +162,6 @@ def test_subsampling(): assert_exception(TypeError, lambda: roundtrip(lena(), subsampling="1:1:1")) -def test_truncated_jpeg(): - def test(junk): - if junk: - # replace "junk" bytes at the end with junk - file = BytesIO(data[:-junk] + b'\0'*junk) - else: - file = BytesIO(data) - im = Image.open(file) - im.load() - assert_no_exception(lambda: test(0)) - assert_exception(IOError, lambda: test(1)) - assert_no_exception(lambda: test(2)) - assert_no_exception(lambda: test(4)) - assert_no_exception(lambda: test(8)) - assert_exception(IOError, lambda: test(10)) - def test_exif(): im = Image.open("Tests/images/pil_sample_rgb.jpg") info = im._getexif()