summaryrefslogtreecommitdiff
path: root/numpy/fft/tests/test_helper.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/fft/tests/test_helper.py')
-rw-r--r--numpy/fft/tests/test_helper.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/numpy/fft/tests/test_helper.py b/numpy/fft/tests/test_helper.py
index aaec6530a..42678fb79 100644
--- a/numpy/fft/tests/test_helper.py
+++ b/numpy/fft/tests/test_helper.py
@@ -7,16 +7,15 @@ import sys
from numpy.testing import *
set_package_path()
from numpy.fft import fftshift,ifftshift,fftfreq
-del sys.path[0]
+restore_path()
from numpy import pi
def random(size):
return rand(*size)
-class TestFFTShift(NumpyTestCase):
-
- def check_definition(self):
+class TestFFTShift(TestCase):
+ def test_definition(self):
x = [0,1,2,3,4,-4,-3,-2,-1]
y = [-4,-3,-2,-1,0,1,2,3,4]
assert_array_almost_equal(fftshift(x),y)
@@ -26,14 +25,14 @@ class TestFFTShift(NumpyTestCase):
assert_array_almost_equal(fftshift(x),y)
assert_array_almost_equal(ifftshift(y),x)
- def check_inverse(self):
+ def test_inverse(self):
for n in [1,4,9,100,211]:
x = random((n,))
assert_array_almost_equal(ifftshift(fftshift(x)),x)
-class TestFFTFreq(NumpyTestCase):
- def check_definition(self):
+class TestFFTFreq(TestCase):
+ def test_definition(self):
x = [0,1,2,3,4,-4,-3,-2,-1]
assert_array_almost_equal(9*fftfreq(9),x)
assert_array_almost_equal(9*pi*fftfreq(9,pi),x)
@@ -41,5 +40,6 @@ class TestFFTFreq(NumpyTestCase):
assert_array_almost_equal(10*fftfreq(10),x)
assert_array_almost_equal(10*pi*fftfreq(10,pi),x)
+
if __name__ == "__main__":
- NumpyTest().run()
+ nose.run(argv=['', __file__])