From 3dcef86fe55cdc73dfe2de312ea60663c82f87e2 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Mon, 14 Nov 2016 21:12:25 +1100 Subject: [PATCH] Added missing top-level test code --- Tests/test_image.py | 3 --- Tests/test_image_paste.py | 6 +++++- Tests/test_scipy.py | 6 +++++- Tests/test_tiff_ifdrational.py | 5 ++++- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/Tests/test_image.py b/Tests/test_image.py index 717d4dbfb..a625a429b 100644 --- a/Tests/test_image.py +++ b/Tests/test_image.py @@ -261,8 +261,5 @@ class TestImage(PillowTestCase): Image.core.fill('RGB', (2,-2), (0,0,0)) - - - if __name__ == '__main__': unittest.main() diff --git a/Tests/test_image_paste.py b/Tests/test_image_paste.py index f3fe9a2af..0d3d18858 100644 --- a/Tests/test_image_paste.py +++ b/Tests/test_image_paste.py @@ -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() diff --git a/Tests/test_scipy.py b/Tests/test_scipy.py index dda49e707..8be16c518 100644 --- a/Tests/test_scipy.py +++ b/Tests/test_scipy.py @@ -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() diff --git a/Tests/test_tiff_ifdrational.py b/Tests/test_tiff_ifdrational.py index dd3ad1b3d..7e2c908b5 100644 --- a/Tests/test_tiff_ifdrational.py +++ b/Tests/test_tiff_ifdrational.py @@ -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()