Added missing top-level test code

This commit is contained in:
Andrew Murray 2016-11-14 21:12:25 +11:00
parent 76d156bef0
commit 3dcef86fe5
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)) Image.core.fill('RGB', (2,-2), (0,0,0))
if __name__ == '__main__': if __name__ == '__main__':
unittest.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 from PIL import Image
@ -250,3 +250,7 @@ class TestImagingPaste(PillowTestCase):
(48, 15, 15, 47), (48, 15, 15, 47),
(126, 63, 255, 63) (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: try:
import numpy as np import numpy as np
@ -41,3 +41,7 @@ class Test_scipy_resize(PillowTestCase):
assert_equal(im2, res) assert_equal(im2, res)
assert_equal(im3, res) assert_equal(im3, res)
assert_equal(im4, res) assert_equal(im4, res)
if __name__ == '__main__':
unittest.main()

View File

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