[Scipy-svn] r3840 - trunk/scipy/misc/tests
scipy-svn at scipy.org
scipy-svn at scipy.org
Wed Jan 16 07:05:26 EST 2008
Author: matthew.brett at gmail.com
Date: 2008-01-16 06:05:14 -0600 (Wed, 16 Jan 2008)
New Revision: 3840
Modified:
trunk/scipy/misc/tests/test_pilutil.py
Log:
Only run PIL tests if PIL is importable
Modified: trunk/scipy/misc/tests/test_pilutil.py
===================================================================
--- trunk/scipy/misc/tests/test_pilutil.py 2008-01-15 19:32:21 UTC (rev 3839)
+++ trunk/scipy/misc/tests/test_pilutil.py 2008-01-16 12:05:14 UTC (rev 3840)
@@ -4,7 +4,14 @@
from scipy.testing import *
-import PIL.Image
+try:
+ import PIL.Image
+except ImportError:
+ _have_PIL = False
+else:
+ _have_PIL = True
+TestCase.__test__ = _have_PIL
+
import scipy.misc.pilutil as pilutil
datapath = os.path.dirname(__file__)
@@ -29,6 +36,7 @@
assert img.min() >= imin
assert img.max() <= imax
+ at dec.is_nosetest(_have_PIL)
def test_fromimage():
''' Test generator for parametric tests '''
data = {'icon.png':(0,255),
More information about the Scipy-svn
mailing list