[Scipy-svn] r4459 - trunk/scipy/weave/tests
scipy-svn@scip...
scipy-svn@scip...
Sun Jun 22 10:45:11 CDT 2008
Author: cdavid
Date: 2008-06-22 10:45:05 -0500 (Sun, 22 Jun 2008)
New Revision: 4459
Modified:
trunk/scipy/weave/tests/test_wx_spec.py
Log:
Fix weave test: conditionally import wx to avoid ImportError for platforms wo wx.
Modified: trunk/scipy/weave/tests/test_wx_spec.py
===================================================================
--- trunk/scipy/weave/tests/test_wx_spec.py 2008-06-22 15:14:43 UTC (rev 4458)
+++ trunk/scipy/weave/tests/test_wx_spec.py 2008-06-22 15:45:05 UTC (rev 4459)
@@ -13,12 +13,18 @@
from scipy.weave import ext_tools, wx_spec
-import wx
+try:
+ import wx
+except ImportError:
+ wx = None
+skip = dec.skipif(True, "Cannot import wx, skipping ")
+
class TestWxConverter(TestCase):
def setUp(self):
- self.app = wx.App()
- self.s = wx_spec.wx_converter()
+ if wx:
+ self.app = wx.App()
+ self.s = wx_spec.wx_converter()
@dec.slow
def test_type_match_string(self):
@@ -107,5 +113,7 @@
c = wx_return.test(b)
assert(c == 'hello')
+decorate_methods(TestWxConverter, skip)
+
if __name__ == "__main__":
nose.run(argv=['', __file__])
More information about the Scipy-svn
mailing list