[Numpy-svn] r5353 - in trunk/numpy: distutils/tests/f2py_ext/tests distutils/tests/f2py_f90_ext/tests distutils/tests/gen_ext/tests distutils/tests/pyrex_ext/tests distutils/tests/swig_ext/tests f2py/tests/array_from_pyobj/tests

numpy-svn@scip... numpy-svn@scip...
Sat Jul 5 09:50:30 CDT 2008


Author: alan.mcintyre
Date: 2008-07-05 09:50:19 -0500 (Sat, 05 Jul 2008)
New Revision: 5353

Modified:
   trunk/numpy/distutils/tests/f2py_ext/tests/test_fib2.py
   trunk/numpy/distutils/tests/f2py_f90_ext/tests/test_foo.py
   trunk/numpy/distutils/tests/gen_ext/tests/test_fib3.py
   trunk/numpy/distutils/tests/pyrex_ext/tests/test_primes.py
   trunk/numpy/distutils/tests/swig_ext/tests/test_example.py
   trunk/numpy/distutils/tests/swig_ext/tests/test_example2.py
   trunk/numpy/f2py/tests/array_from_pyobj/tests/test_array_from_pyobj.py
Log:
Remove uses of set_package_path, set_local_path, restore_path, and 
associated sys.path manipulations.


Modified: trunk/numpy/distutils/tests/f2py_ext/tests/test_fib2.py
===================================================================
--- trunk/numpy/distutils/tests/f2py_ext/tests/test_fib2.py	2008-07-05 14:32:42 UTC (rev 5352)
+++ trunk/numpy/distutils/tests/f2py_ext/tests/test_fib2.py	2008-07-05 14:50:19 UTC (rev 5353)
@@ -1,8 +1,6 @@
 import sys
 from numpy.testing import *
-set_package_path()
 from f2py_ext import fib2
-del sys.path[0]
 
 class TestFib2(TestCase):
 

Modified: trunk/numpy/distutils/tests/f2py_f90_ext/tests/test_foo.py
===================================================================
--- trunk/numpy/distutils/tests/f2py_f90_ext/tests/test_foo.py	2008-07-05 14:32:42 UTC (rev 5352)
+++ trunk/numpy/distutils/tests/f2py_f90_ext/tests/test_foo.py	2008-07-05 14:50:19 UTC (rev 5353)
@@ -1,11 +1,8 @@
 import sys
 from numpy.testing import *
-set_package_path()
 from f2py_f90_ext import foo
-del sys.path[0]
 
 class TestFoo(TestCase):
-
     def test_foo_free(self):
         assert_equal(foo.foo_free.bar13(),13)
 

Modified: trunk/numpy/distutils/tests/gen_ext/tests/test_fib3.py
===================================================================
--- trunk/numpy/distutils/tests/gen_ext/tests/test_fib3.py	2008-07-05 14:32:42 UTC (rev 5352)
+++ trunk/numpy/distutils/tests/gen_ext/tests/test_fib3.py	2008-07-05 14:50:19 UTC (rev 5353)
@@ -1,11 +1,8 @@
 import sys
 from numpy.testing import *
-set_package_path()
 from gen_ext import fib3
-del sys.path[0]
 
 class TestFib3(TestCase):
-
     def test_fib(self):
         assert_array_equal(fib3.fib(6),[0,1,1,2,3,5])
 

Modified: trunk/numpy/distutils/tests/pyrex_ext/tests/test_primes.py
===================================================================
--- trunk/numpy/distutils/tests/pyrex_ext/tests/test_primes.py	2008-07-05 14:32:42 UTC (rev 5352)
+++ trunk/numpy/distutils/tests/pyrex_ext/tests/test_primes.py	2008-07-05 14:50:19 UTC (rev 5353)
@@ -1,13 +1,12 @@
 import sys
 from numpy.testing import *
-
-set_package_path()
 from pyrex_ext.primes import primes
-restore_path()
 
 class TestPrimes(TestCase):
     def test_simple(self, level=1):
         l = primes(10)
         assert_equal(l, [2, 3, 5, 7, 11, 13, 17, 19, 23, 29])
+
+
 if __name__ == "__main__":
     run_module_suite()

Modified: trunk/numpy/distutils/tests/swig_ext/tests/test_example.py
===================================================================
--- trunk/numpy/distutils/tests/swig_ext/tests/test_example.py	2008-07-05 14:32:42 UTC (rev 5352)
+++ trunk/numpy/distutils/tests/swig_ext/tests/test_example.py	2008-07-05 14:50:19 UTC (rev 5353)
@@ -1,11 +1,8 @@
 import sys
 from numpy.testing import *
-set_package_path()
 from swig_ext import example
-restore_path()
 
 class TestExample(TestCase):
-
     def test_fact(self):
         assert_equal(example.fact(10),3628800)
 
@@ -14,5 +11,6 @@
         example.cvar.My_variable = 5
         assert_equal(example.cvar.My_variable,5.0)
 
+
 if __name__ == "__main__":
     run_module_suite()

Modified: trunk/numpy/distutils/tests/swig_ext/tests/test_example2.py
===================================================================
--- trunk/numpy/distutils/tests/swig_ext/tests/test_example2.py	2008-07-05 14:32:42 UTC (rev 5352)
+++ trunk/numpy/distutils/tests/swig_ext/tests/test_example2.py	2008-07-05 14:50:19 UTC (rev 5353)
@@ -1,11 +1,8 @@
 import sys
 from numpy.testing import *
-set_package_path()
 from swig_ext import example2
-restore_path()
 
 class TestExample2(TestCase):
-
     def test_zoo(self):
         z = example2.Zoo()
         z.shut_up('Tiger')

Modified: trunk/numpy/f2py/tests/array_from_pyobj/tests/test_array_from_pyobj.py
===================================================================
--- trunk/numpy/f2py/tests/array_from_pyobj/tests/test_array_from_pyobj.py	2008-07-05 14:32:42 UTC (rev 5352)
+++ trunk/numpy/f2py/tests/array_from_pyobj/tests/test_array_from_pyobj.py	2008-07-05 14:50:19 UTC (rev 5353)
@@ -5,10 +5,7 @@
 from numpy.testing import *
 from numpy import array, alltrue, ndarray, asarray, can_cast,zeros, dtype
 from numpy.core.multiarray import typeinfo
-
-set_package_path()
 from array_from_pyobj import wrap
-restore_path()
 
 def flags_info(arr):
     flags = wrap.array_attrs(arr)[6]



More information about the Numpy-svn mailing list