Merge pull request #2222 from radarhere/main

Added missing top-level test __main__
This commit is contained in:
wiredfool 2016-11-14 13:14:55 +00:00 committed by GitHub
commit 9873e4f4f0
4 changed files with 14 additions and 6 deletions

View File

@ -261,8 +261,5 @@ class TestImage(PillowTestCase):
Image.core.fill('RGB', (2,-2), (0,0,0))
if __name__ == '__main__':
unittest.main()

View File

@ -1,4 +1,4 @@
from helper import PillowTestCase, cached_property
from helper import unittest, PillowTestCase, cached_property
from PIL import Image
@ -250,3 +250,7 @@ class TestImagingPaste(PillowTestCase):
(48, 15, 15, 47),
(126, 63, 255, 63)
])
if __name__ == '__main__':
unittest.main()

View File

@ -1,4 +1,4 @@
from helper import PillowTestCase
from helper import unittest, PillowTestCase
try:
import numpy as np
@ -41,3 +41,7 @@ class Test_scipy_resize(PillowTestCase):
assert_equal(im2, res)
assert_equal(im3, res)
assert_equal(im4, res)
if __name__ == '__main__':
unittest.main()

View File

@ -1,6 +1,6 @@
from __future__ import print_function
from helper import PillowTestCase, hopper
from helper import unittest, PillowTestCase, hopper
from PIL import TiffImagePlugin, Image
from PIL.TiffImagePlugin import IFDRational
@ -60,3 +60,6 @@ class Test_IFDRational(PillowTestCase):
reloaded = Image.open(out)
self.assertEqual(float(IFDRational(301, 1)),
float(reloaded.tag_v2[282]))
if __name__ == '__main__':
unittest.main()