diff options
author | Alan McIntyre <alan.mcintyre@local> | 2008-07-05 14:50:19 +0000 |
---|---|---|
committer | Alan McIntyre <alan.mcintyre@local> | 2008-07-05 14:50:19 +0000 |
commit | 73cc84b6319763a0661fe90100807757e5e88430 (patch) | |
tree | a5d6f8661f096126971336ac45d701aa62a306bd /numpy/distutils/tests | |
parent | dcb2ea64c660f6f554a4afbbfa0d5dfbbb518e01 (diff) | |
download | numpy-73cc84b6319763a0661fe90100807757e5e88430.tar.gz |
Remove uses of set_package_path, set_local_path, restore_path, and
associated sys.path manipulations.
Diffstat (limited to 'numpy/distutils/tests')
6 files changed, 3 insertions, 17 deletions
diff --git a/numpy/distutils/tests/f2py_ext/tests/test_fib2.py b/numpy/distutils/tests/f2py_ext/tests/test_fib2.py index 8ea7bbfe5..027f455de 100644 --- a/numpy/distutils/tests/f2py_ext/tests/test_fib2.py +++ b/numpy/distutils/tests/f2py_ext/tests/test_fib2.py @@ -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): diff --git a/numpy/distutils/tests/f2py_f90_ext/tests/test_foo.py b/numpy/distutils/tests/f2py_f90_ext/tests/test_foo.py index 4e2bb0cf4..1543051dc 100644 --- a/numpy/distutils/tests/f2py_f90_ext/tests/test_foo.py +++ b/numpy/distutils/tests/f2py_f90_ext/tests/test_foo.py @@ -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) diff --git a/numpy/distutils/tests/gen_ext/tests/test_fib3.py b/numpy/distutils/tests/gen_ext/tests/test_fib3.py index 59e41fbbe..8a9a443a5 100644 --- a/numpy/distutils/tests/gen_ext/tests/test_fib3.py +++ b/numpy/distutils/tests/gen_ext/tests/test_fib3.py @@ -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]) diff --git a/numpy/distutils/tests/pyrex_ext/tests/test_primes.py b/numpy/distutils/tests/pyrex_ext/tests/test_primes.py index 7fe03e97f..eb2c91da7 100644 --- a/numpy/distutils/tests/pyrex_ext/tests/test_primes.py +++ b/numpy/distutils/tests/pyrex_ext/tests/test_primes.py @@ -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() diff --git a/numpy/distutils/tests/swig_ext/tests/test_example.py b/numpy/distutils/tests/swig_ext/tests/test_example.py index 11dea220f..9afc01cb2 100644 --- a/numpy/distutils/tests/swig_ext/tests/test_example.py +++ b/numpy/distutils/tests/swig_ext/tests/test_example.py @@ -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 @@ class TestExample(TestCase): example.cvar.My_variable = 5 assert_equal(example.cvar.My_variable,5.0) + if __name__ == "__main__": run_module_suite() diff --git a/numpy/distutils/tests/swig_ext/tests/test_example2.py b/numpy/distutils/tests/swig_ext/tests/test_example2.py index 062c3e6ea..42d1fcbcd 100644 --- a/numpy/distutils/tests/swig_ext/tests/test_example2.py +++ b/numpy/distutils/tests/swig_ext/tests/test_example2.py @@ -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') |