diff --git a/Tests/helper.py b/Tests/helper.py index fdeb00c0c..607330122 100644 --- a/Tests/helper.py +++ b/Tests/helper.py @@ -16,7 +16,7 @@ logger = logging.getLogger(__name__) HAS_UPLOADER = False if os.environ.get('SHOW_ERRORS', None): - # local img.show for errors. + # local img.show for errors. HAS_UPLOADER=True class test_image_results: @classmethod @@ -119,7 +119,7 @@ class PillowTestCase(unittest.TestCase): if mode: img = img.convert(mode) self.assert_image_equal(a, img, msg) - + def assert_image_similar(self, a, b, epsilon, msg=None): epsilon = float(epsilon) self.assertEqual( diff --git a/Tests/test_file_sgi.py b/Tests/test_file_sgi.py index f18fb13de..aa33c9d93 100644 --- a/Tests/test_file_sgi.py +++ b/Tests/test_file_sgi.py @@ -80,7 +80,7 @@ class TestFileSgi(PillowTestCase): reloaded = Image.open(out) self.assert_image_equal(im, reloaded) - + def test_unsupported_mode(self): im = hopper('LA') out = self.tempfile('temp.sgi') diff --git a/Tests/test_file_tiff_metadata.py b/Tests/test_file_tiff_metadata.py index bb5768046..0f0031f7d 100644 --- a/Tests/test_file_tiff_metadata.py +++ b/Tests/test_file_tiff_metadata.py @@ -70,7 +70,7 @@ class TestFileTiffMetadata(PillowTestCase): self.assertAlmostEqual(loaded_double, doubledata) # check with 2 element ImageJMetaDataByteCounts, issue #2006 - + info[ImageJMetaDataByteCounts] = (8, len(bindata) - 8) img.save(f, tiffinfo=info) loaded = Image.open(f) diff --git a/Tests/test_font_leaks.py b/Tests/test_font_leaks.py index 709339233..009211aec 100644 --- a/Tests/test_font_leaks.py +++ b/Tests/test_font_leaks.py @@ -14,7 +14,7 @@ class TestTTypeFontLeak(PillowLeakTestCase): draw = ImageDraw.ImageDraw(im) self._test_leak(lambda: draw.text((0, 0), "some text "*1024, #~10k font=font, fill="black")) - + @unittest.skipIf(not features.check('freetype2'), "Test requires freetype2") def test_leak(self): ttype = ImageFont.truetype('Tests/fonts/FreeMono.ttf', 20) @@ -24,7 +24,7 @@ class TestDefaultFontLeak(TestTTypeFontLeak): # fails at iteration 37 in master iterations = 100 mem_limit = 1024 #k - + def test_leak(self): default_font = ImageFont.load_default() self._test_font(default_font) diff --git a/Tests/test_font_pcf.py b/Tests/test_font_pcf.py index dc4c586c0..75ff364f9 100644 --- a/Tests/test_font_pcf.py +++ b/Tests/test_font_pcf.py @@ -51,7 +51,7 @@ class TestFontPcf(PillowTestCase): draw.text((0, 0), message, 'black', font=font) with Image.open('Tests/images/test_draw_pbm_target.png') as target: self.assert_image_similar(im, target, 0) - + def test_textsize(self): tempname = self.save_font() font = ImageFont.load(tempname) diff --git a/Tests/test_image_convert.py b/Tests/test_image_convert.py index 9fd0463d4..de88ff519 100644 --- a/Tests/test_image_convert.py +++ b/Tests/test_image_convert.py @@ -89,7 +89,7 @@ class TestImageConvert(PillowTestCase): self.assertNotIn('transparency', rgba.info) # https://github.com/python-pillow/Pillow/issues/2702 self.assertEqual(rgba.palette, None) - + def test_trns_l(self): im = hopper('L') diff --git a/Tests/test_imagefontctl.py b/Tests/test_imagefontctl.py index 79122f6c1..ee20014e1 100644 --- a/Tests/test_imagefontctl.py +++ b/Tests/test_imagefontctl.py @@ -15,8 +15,8 @@ class TestImagecomplextext(PillowTestCase): im = Image.new(mode='RGB', size=(300, 100)) draw = ImageDraw.Draw(im) draw.text((0, 0), 'TEST', font=ttf, fill=500, direction='ltr') - - + + def test_complex_text(self): ttf = ImageFont.truetype(FONT_PATH, FONT_SIZE) @@ -102,7 +102,7 @@ class TestImagecomplextext(PillowTestCase): liga_size = ttf.getsize('fi', features=['-liga']) self.assertEqual(liga_size,(13,19)) - + def test_kerning_features(self): ttf = ImageFont.truetype(FONT_PATH, FONT_SIZE)