[Scipy-svn] r4458 - trunk/scipy/stats/models/tests
scipy-svn at scipy.org
scipy-svn at scipy.org
Sun Jun 22 11:14:49 EDT 2008
Author: cdavid
Date: 2008-06-22 10:14:43 -0500 (Sun, 22 Jun 2008)
New Revision: 4458
Modified:
trunk/scipy/stats/models/tests/test_bspline.py
Log:
Do not run bspline tests if _bspline is not available.
Modified: trunk/scipy/stats/models/tests/test_bspline.py
===================================================================
--- trunk/scipy/stats/models/tests/test_bspline.py 2008-06-21 16:48:48 UTC (rev 4457)
+++ trunk/scipy/stats/models/tests/test_bspline.py 2008-06-22 15:14:43 UTC (rev 4458)
@@ -6,17 +6,21 @@
from scipy.testing import *
import scipy.stats.models as S
-import scipy.stats.models.bspline as B
+try:
+ import scipy.stats.models.bspline as B
+except ImportError:
+ B = None
class TestBSpline(TestCase):
def test1(self):
- b = B.BSpline(N.linspace(0,10,11), x=N.linspace(0,10,101))
- old = b._basisx.shape
- b.x = N.linspace(0,10,51)
- new = b._basisx.shape
- self.assertEqual((old[0], 51), new)
+ if B:
+ b = B.BSpline(N.linspace(0,10,11), x=N.linspace(0,10,101))
+ old = b._basisx.shape
+ b.x = N.linspace(0,10,51)
+ new = b._basisx.shape
+ self.assertEqual((old[0], 51), new)
if __name__ == "__main__":
More information about the Scipy-svn
mailing list