[Scipy-svn] r4617 - in trunk/scipy: sandbox/cdavid/tests sandbox/spline/tests weave/tests

scipy-svn@scip... scipy-svn@scip...
Fri Aug 8 01:06:27 CDT 2008


Author: jarrod.millman
Date: 2008-08-08 01:06:21 -0500 (Fri, 08 Aug 2008)
New Revision: 4617

Modified:
   trunk/scipy/sandbox/cdavid/tests/test_segmentaxis.py
   trunk/scipy/sandbox/spline/tests/test_fitpack.py
   trunk/scipy/sandbox/spline/tests/test_spline.py
   trunk/scipy/weave/tests/test_ast_tools.py
   trunk/scipy/weave/tests/test_blitz_tools.py
   trunk/scipy/weave/tests/test_catalog.py
   trunk/scipy/weave/tests/test_ext_tools.py
   trunk/scipy/weave/tests/test_inline_tools.py
   trunk/scipy/weave/tests/test_scxx.py
Log:
remove old code


Modified: trunk/scipy/sandbox/cdavid/tests/test_segmentaxis.py
===================================================================
--- trunk/scipy/sandbox/cdavid/tests/test_segmentaxis.py	2008-08-08 05:33:08 UTC (rev 4616)
+++ trunk/scipy/sandbox/cdavid/tests/test_segmentaxis.py	2008-08-08 06:06:21 UTC (rev 4617)
@@ -3,61 +3,57 @@
 
 from numpy.testing import *
 
-import numpy as N
+import numpy as np
 
 
 from scipy.sandbox.cdavid.segmentaxis import segment_axis
 
 
-# #Optional:
-# set_local_path()
-# # import modules that are located in the same directory as this file.
 
-
 class TestSegment(TestCase):
     def test_simple(self):
-        assert_equal(segment_axis(N.arange(6),length=3,overlap=0),
-                         N.array([[0,1,2],[3,4,5]]))
+        assert_equal(segment_axis(np.arange(6),length=3,overlap=0),
+                         np.array([[0,1,2],[3,4,5]]))
 
-        assert_equal(segment_axis(N.arange(7),length=3,overlap=1),
-                         N.array([[0,1,2],[2,3,4],[4,5,6]]))
+        assert_equal(segment_axis(np.arange(7),length=3,overlap=1),
+                         np.array([[0,1,2],[2,3,4],[4,5,6]]))
 
-        assert_equal(segment_axis(N.arange(7),length=3,overlap=2),
-                         N.array([[0,1,2],[1,2,3],[2,3,4],[3,4,5],[4,5,6]]))
+        assert_equal(segment_axis(np.arange(7),length=3,overlap=2),
+                         np.array([[0,1,2],[1,2,3],[2,3,4],[3,4,5],[4,5,6]]))
 
     def test_error_checking(self):
         self.assertRaises(ValueError,
-                lambda: segment_axis(N.arange(7),length=3,overlap=-1))
+                lambda: segment_axis(np.arange(7),length=3,overlap=-1))
         self.assertRaises(ValueError,
-                lambda: segment_axis(N.arange(7),length=0,overlap=0))
+                lambda: segment_axis(np.arange(7),length=0,overlap=0))
         self.assertRaises(ValueError,
-                lambda: segment_axis(N.arange(7),length=3,overlap=3))
+                lambda: segment_axis(np.arange(7),length=3,overlap=3))
         self.assertRaises(ValueError,
-                lambda: segment_axis(N.arange(7),length=8,overlap=3))
+                lambda: segment_axis(np.arange(7),length=8,overlap=3))
 
     def test_ending(self):
-        assert_equal(segment_axis(N.arange(6),length=3,overlap=1,end='cut'),
-                         N.array([[0,1,2],[2,3,4]]))
-        assert_equal(segment_axis(N.arange(6),length=3,overlap=1,end='wrap'),
-                         N.array([[0,1,2],[2,3,4],[4,5,0]]))
-        assert_equal(segment_axis(N.arange(6),length=3,overlap=1,end='pad',endvalue=-17),
-                         N.array([[0,1,2],[2,3,4],[4,5,-17]]))
+        assert_equal(segment_axis(np.arange(6),length=3,overlap=1,end='cut'),
+                         np.array([[0,1,2],[2,3,4]]))
+        assert_equal(segment_axis(np.arange(6),length=3,overlap=1,end='wrap'),
+                         np.array([[0,1,2],[2,3,4],[4,5,0]]))
+        assert_equal(segment_axis(np.arange(6),length=3,overlap=1,end='pad',endvalue=-17),
+                         np.array([[0,1,2],[2,3,4],[4,5,-17]]))
 
     def test_multidimensional(self):
 
-        assert_equal(segment_axis(N.ones((2,3,4,5,6)),axis=3,length=3,overlap=1).shape,
+        assert_equal(segment_axis(np.ones((2,3,4,5,6)),axis=3,length=3,overlap=1).shape,
                      (2,3,4,2,3,6))
 
-        assert_equal(segment_axis(N.ones((2,5,4,3,6)).swapaxes(1,3),axis=3,length=3,overlap=1).shape,
+        assert_equal(segment_axis(np.ones((2,5,4,3,6)).swapaxes(1,3),axis=3,length=3,overlap=1).shape,
                      (2,3,4,2,3,6))
 
-        assert_equal(segment_axis(N.ones((2,3,4,5,6)),axis=2,length=3,overlap=1,end='cut').shape,
+        assert_equal(segment_axis(np.ones((2,3,4,5,6)),axis=2,length=3,overlap=1,end='cut').shape,
                      (2,3,1,3,5,6))
 
-        assert_equal(segment_axis(N.ones((2,3,4,5,6)),axis=2,length=3,overlap=1,end='wrap').shape,
+        assert_equal(segment_axis(np.ones((2,3,4,5,6)),axis=2,length=3,overlap=1,end='wrap').shape,
                      (2,3,2,3,5,6))
 
-        assert_equal(segment_axis(N.ones((2,3,4,5,6)),axis=2,length=3,overlap=1,end='pad').shape,
+        assert_equal(segment_axis(np.ones((2,3,4,5,6)),axis=2,length=3,overlap=1,end='pad').shape,
                      (2,3,2,3,5,6))
 
 if __name__=='__main__':

Modified: trunk/scipy/sandbox/spline/tests/test_fitpack.py
===================================================================
--- trunk/scipy/sandbox/spline/tests/test_fitpack.py	2008-08-08 05:33:08 UTC (rev 4616)
+++ trunk/scipy/sandbox/spline/tests/test_fitpack.py	2008-08-08 06:06:21 UTC (rev 4617)
@@ -20,9 +20,7 @@
      splint, spalde, bisplev, bisplrep, splprep
 
 
-set_local_path()
 from dierckx_test_data import *
-restore_path()
 
 class TestSplrepSplev(TestCase):
     def test_curfit_against_dierckx_smth(self):

Modified: trunk/scipy/sandbox/spline/tests/test_spline.py
===================================================================
--- trunk/scipy/sandbox/spline/tests/test_spline.py	2008-08-08 05:33:08 UTC (rev 4616)
+++ trunk/scipy/sandbox/spline/tests/test_spline.py	2008-08-08 06:06:21 UTC (rev 4617)
@@ -21,9 +21,7 @@
      InterpolatedUnivariateSpline, LSQBivariateSpline, SmoothBivariateSpline,\
      RectBivariateSpline
 
-set_local_path()
 from dierckx_test_data import *
-restore_path()
 
 class TestUnivariateSpline(TestCase):
     def test_linear_constant(self):

Modified: trunk/scipy/weave/tests/test_ast_tools.py
===================================================================
--- trunk/scipy/weave/tests/test_ast_tools.py	2008-08-08 05:33:08 UTC (rev 4616)
+++ trunk/scipy/weave/tests/test_ast_tools.py	2008-08-08 06:06:21 UTC (rev 4617)
@@ -1,10 +1,7 @@
 from numpy.testing import *
 
 from scipy.weave import ast_tools
-
-set_local_path()
 from weave_test_utils import *
-restore_path()
 
 class TestHarvestVariables(TestCase):
     """ Not much testing going on here, but

Modified: trunk/scipy/weave/tests/test_blitz_tools.py
===================================================================
--- trunk/scipy/weave/tests/test_blitz_tools.py	2008-08-08 05:33:08 UTC (rev 4616)
+++ trunk/scipy/weave/tests/test_blitz_tools.py	2008-08-08 06:06:21 UTC (rev 4617)
@@ -8,10 +8,7 @@
 
 from scipy.weave import blitz_tools
 from scipy.weave.ast_tools import harvest_variables
-
-set_local_path()
 from weave_test_utils import *
-restore_path()
 
 
 class TestAstToBlitzExpr(TestCase):

Modified: trunk/scipy/weave/tests/test_catalog.py
===================================================================
--- trunk/scipy/weave/tests/test_catalog.py	2008-08-08 05:33:08 UTC (rev 4616)
+++ trunk/scipy/weave/tests/test_catalog.py	2008-08-08 06:06:21 UTC (rev 4617)
@@ -5,10 +5,7 @@
 from numpy.testing import *
 
 from scipy.weave import catalog
-
-set_local_path()
 from weave_test_utils import *
-restore_path()
 
 
 class TestDefaultDir(TestCase):

Modified: trunk/scipy/weave/tests/test_ext_tools.py
===================================================================
--- trunk/scipy/weave/tests/test_ext_tools.py	2008-08-08 05:33:08 UTC (rev 4616)
+++ trunk/scipy/weave/tests/test_ext_tools.py	2008-08-08 06:06:21 UTC (rev 4617)
@@ -1,4 +1,3 @@
-
 import time
 
 from numpy.testing import *
@@ -10,9 +9,7 @@
     pass # requires numpy.numerix
 
 
-set_local_path()
 from weave_test_utils import *
-restore_path()
 
 build_dir = empty_temp_dir()
 print 'building extensions here:', build_dir

Modified: trunk/scipy/weave/tests/test_inline_tools.py
===================================================================
--- trunk/scipy/weave/tests/test_inline_tools.py	2008-08-08 05:33:08 UTC (rev 4616)
+++ trunk/scipy/weave/tests/test_inline_tools.py	2008-08-08 06:06:21 UTC (rev 4617)
@@ -1,13 +1,8 @@
-
 from numpy import *
-
 from numpy.testing import *
 
 from scipy.weave import inline_tools
-
-set_local_path()
 from test_scxx import *
-restore_path()
 
 class TestInline(TestCase):
     """ These are long running tests...

Modified: trunk/scipy/weave/tests/test_scxx.py
===================================================================
--- trunk/scipy/weave/tests/test_scxx.py	2008-08-08 05:33:08 UTC (rev 4616)
+++ trunk/scipy/weave/tests/test_scxx.py	2008-08-08 06:06:21 UTC (rev 4617)
@@ -5,7 +5,6 @@
 import os,sys
 
 from numpy.testing import *
-set_local_path()
 from test_scxx_object import *
 from test_scxx_sequence import *
 from test_scxx_dict import *



More information about the Scipy-svn mailing list