From 3e361d800d99f056324e502c869f957076237f18 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Tue, 26 Aug 2014 09:57:15 -0700 Subject: [PATCH] Refactor inheritance tree of test_file_libtiff_small --- Tests/test_file_libtiff.py | 5 +++-- Tests/test_file_libtiff_small.py | 6 ++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Tests/test_file_libtiff.py b/Tests/test_file_libtiff.py index 60eea8b3b..b5df39d04 100644 --- a/Tests/test_file_libtiff.py +++ b/Tests/test_file_libtiff.py @@ -4,8 +4,7 @@ import os from PIL import Image, TiffImagePlugin - -class TestFileLibTiff(PillowTestCase): +class LibTiffTestCase(PillowTestCase): def setUp(self): codecs = dir(Image.core) @@ -32,6 +31,8 @@ class TestFileLibTiff(PillowTestCase): out = self.tempfile("temp.png") im.save(out) +class TestFileLibTiff(LibTiffTestCase): + def test_g4_tiff(self): """Test the ordinary file path load path""" diff --git a/Tests/test_file_libtiff_small.py b/Tests/test_file_libtiff_small.py index 043ecaf3f..9c73ee5c2 100644 --- a/Tests/test_file_libtiff_small.py +++ b/Tests/test_file_libtiff_small.py @@ -2,12 +2,10 @@ from helper import unittest from PIL import Image -from test_file_libtiff import TestFileLibTiff +from test_file_libtiff import LibTiffTestCase -class TestFileLibTiffSmall(TestFileLibTiff): - - # Inherits TestFileLibTiff's setUp() and self._assert_noerr() +class TestFileLibTiffSmall(LibTiffTestCase): """ The small lena image was failing on open in the libtiff decoder because the file pointer was set to the wrong place