From 6357b4707c492cf2389b995ef620693cc11140f3 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Tue, 22 Oct 2013 10:09:25 -0700 Subject: [PATCH] String attr test case --- Tests/test_file_libtiff.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Tests/test_file_libtiff.py b/Tests/test_file_libtiff.py index c717be1e2..c68633780 100644 --- a/Tests/test_file_libtiff.py +++ b/Tests/test_file_libtiff.py @@ -93,6 +93,8 @@ def test_g4_write(): _assert_noerr(reread) assert_image_equal(reread, rot) + assert_equal(reread.info['compression'], orig.info['compression']) + assert_false(orig.tobytes() == reread.tobytes()) def test_adobe_deflate_tiff(): @@ -153,3 +155,17 @@ def test_big_endian(): assert_equal(reread.info['compression'], im.info['compression']) assert_equal(reread.getpixel((0,0)), 480) +def test_g4_string_info(): + """Tests String data in info directory""" + file = "Tests/images/lena_g4_500.tif" + orig = Image.open(file) + + out = tempfile("temp.tif") + + orig.tag[269] = 'temp.tif' + orig.save(out) + + reread = Image.open(out) + assert_equal('temp.tif', reread.tag[269]) + +