mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-10 19:56:47 +03:00
Trim trailing whitespace tests dir
This commit is contained in:
parent
b13025129b
commit
5e94cd0fc2
|
@ -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(
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user