From 5957f5c812f4e1a0013d9f22d9a2c7fdf24d6b99 Mon Sep 17 00:00:00 2001 From: Hugo Date: Tue, 23 Sep 2014 10:30:55 +0300 Subject: [PATCH] Replace lena_g4.tif with hopper_g4.tif --- Tests/test_file_libtiff_small.py | 14 +++++++------- Tests/test_file_tiff_metadata.py | 13 ++++++------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/Tests/test_file_libtiff_small.py b/Tests/test_file_libtiff_small.py index 9c73ee5c2..cd16292a0 100644 --- a/Tests/test_file_libtiff_small.py +++ b/Tests/test_file_libtiff_small.py @@ -15,20 +15,20 @@ class TestFileLibTiffSmall(LibTiffTestCase): file just before reading in libtiff. These tests remain to ensure that it stays fixed. """ - def test_g4_lena_file(self): + def test_g4_hopper_file(self): """Testing the open file load path""" - file = "Tests/images/lena_g4.tif" + file = "Tests/images/hopper_g4.tif" with open(file, 'rb') as f: im = Image.open(f) self.assertEqual(im.size, (128, 128)) self._assert_noerr(im) - def test_g4_lena_bytesio(self): + def test_g4_hopper_bytesio(self): """Testing the bytesio loading code path""" from io import BytesIO - file = "Tests/images/lena_g4.tif" + file = "Tests/images/hopper_g4.tif" s = BytesIO() with open(file, 'rb') as f: s.write(f.read()) @@ -38,10 +38,10 @@ class TestFileLibTiffSmall(LibTiffTestCase): self.assertEqual(im.size, (128, 128)) self._assert_noerr(im) - def test_g4_lena(self): - """The 128x128 lena image fails for some reason. Investigating""" + def test_g4_hopper(self): + """The 128x128 lena image failed for some reason.""" - file = "Tests/images/lena_g4.tif" + file = "Tests/images/hopper_g4.tif" im = Image.open(file) self.assertEqual(im.size, (128, 128)) diff --git a/Tests/test_file_tiff_metadata.py b/Tests/test_file_tiff_metadata.py index afbb23e4d..ac9a2d144 100644 --- a/Tests/test_file_tiff_metadata.py +++ b/Tests/test_file_tiff_metadata.py @@ -31,26 +31,25 @@ class TestFileTiffMetadata(PillowTestCase): self.assertEqual(loaded.tag[50839], textdata) def test_read_metadata(self): - img = Image.open('Tests/images/lena_g4.tif') + img = Image.open('Tests/images/hopper_g4.tif') - known = {'YResolution': ((1207959552, 16777216),), + known = {'YResolution': ((4294967295L, 113653537),), 'PlanarConfiguration': (1,), 'BitsPerSample': (1,), 'ImageLength': (128,), 'Compression': (4,), 'FillOrder': (1,), - 'DocumentName': 'lena.g4.tif', 'RowsPerStrip': (128,), - 'ResolutionUnit': (1,), + 'ResolutionUnit': (3,), 'PhotometricInterpretation': (0,), 'PageNumber': (0, 1), - 'XResolution': ((1207959552, 16777216),), + 'XResolution': ((4294967295L, 113653537),), 'ImageWidth': (128,), 'Orientation': (1,), - 'StripByteCounts': (1796,), + 'StripByteCounts': (1968,), 'SamplesPerPixel': (1,), 'StripOffsets': (8,), - 'Software': 'ImageMagick 6.5.7-8 2012-08-17 Q16 http://www.imagemagick.org'} + } # self.assertEqual is equivalent, # but less helpful in telling what's wrong.