[Scipy-svn] r4463 - trunk/scipy/weave/tests
scipy-svn at scipy.org
scipy-svn at scipy.org
Mon Jun 23 09:58:28 EDT 2008
Author: cdavid
Date: 2008-06-23 08:58:24 -0500 (Mon, 23 Jun 2008)
New Revision: 4463
Modified:
trunk/scipy/weave/tests/test_wx_spec.py
Log:
Do not run wx tests if wx not found.
Modified: trunk/scipy/weave/tests/test_wx_spec.py
===================================================================
--- trunk/scipy/weave/tests/test_wx_spec.py 2008-06-23 13:57:33 UTC (rev 4462)
+++ trunk/scipy/weave/tests/test_wx_spec.py 2008-06-23 13:58:24 UTC (rev 4463)
@@ -10,19 +10,22 @@
from scipy.testing import *
-from scipy.weave import ext_tools, wx_spec
-
-
+e = None
try:
+ from scipy.weave import ext_tools, wx_spec
import wx
-except ImportError:
+except ImportError, e:
wx = None
+ DONOTRUN = True
+except RuntimeError, e:
+ wx = None
+ DONOTRUN = True
-skip = dec.skipif(True, "Cannot import wx, skipping ")
+skip = dec.skipif(DONOTRUN, "(error was %s)" % str(e))
class TestWxConverter(TestCase):
def setUp(self):
- if wx:
+ if not DONOTRUN:
self.app = wx.App()
self.s = wx_spec.wx_converter()
More information about the Scipy-svn
mailing list