summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/tests/test_ma.py12
-rw-r--r--numpy/core/tests/test_multiarray.py30
-rw-r--r--numpy/core/tests/test_umath.py20
-rw-r--r--numpy/core/tests/test_unicode.py50
-rw-r--r--numpy/dft/tests/test_helper.py6
-rw-r--r--numpy/distutils/tests/f2py_ext/tests/test_fib2.py4
-rw-r--r--numpy/distutils/tests/f2py_f90_ext/tests/test_foo.py4
-rw-r--r--numpy/distutils/tests/gen_ext/tests/test_fib3.py4
-rw-r--r--numpy/distutils/tests/pyrex_ext/tests/test_primes.py4
-rw-r--r--numpy/distutils/tests/swig_ext/tests/test_example.py4
-rw-r--r--numpy/distutils/tests/swig_ext/tests/test_example2.py4
-rw-r--r--numpy/distutils/tests/test_misc_util.py6
-rw-r--r--numpy/f2py/tests/array_from_pyobj/tests/test_array_from_pyobj.py2
-rw-r--r--numpy/lib/tests/test_arraysetops.py4
-rw-r--r--numpy/lib/tests/test_function_base.py2
-rw-r--r--numpy/lib/tests/test_getlimits.py10
-rw-r--r--numpy/lib/tests/test_index_tricks.py6
-rw-r--r--numpy/lib/tests/test_polynomial.py2
-rw-r--r--numpy/lib/tests/test_shape_base.py30
-rw-r--r--numpy/lib/tests/test_type_check.py32
20 files changed, 118 insertions, 118 deletions
diff --git a/numpy/core/tests/test_ma.py b/numpy/core/tests/test_ma.py
index afdda90de..312799323 100644
--- a/numpy/core/tests/test_ma.py
+++ b/numpy/core/tests/test_ma.py
@@ -2,7 +2,7 @@ import numpy
import types, time
from numpy.core.ma import *
from numpy.core.numerictypes import float32
-from numpy.testing import ScipyTestCase, ScipyTest
+from numpy.testing import NumpyTestCase, NumpyTest
pi = numpy.pi
def eq(v,w, msg=''):
result = allclose(v,w)
@@ -13,9 +13,9 @@ def eq(v,w, msg=''):
%s"""% (msg, str(v), str(w))
return result
-class test_ma(ScipyTestCase):
+class test_ma(NumpyTestCase):
def __init__(self, *args, **kwds):
- ScipyTestCase.__init__(self, *args, **kwds)
+ NumpyTestCase.__init__(self, *args, **kwds)
self.setUp()
def setUp (self):
@@ -639,7 +639,7 @@ class test_ma(ScipyTestCase):
self.failUnlessEqual(b[0].shape, ())
self.failUnlessEqual(b[1].shape, ())
-class test_ufuncs(ScipyTestCase):
+class test_ufuncs(NumpyTestCase):
def setUp(self):
self.d = (array([1.0, 0, -1, pi/2]*2, mask=[0,1]+[0]*6),
array([1.0, 0, -1, pi/2]*2, mask=[1,0]+[0]*6),)
@@ -699,7 +699,7 @@ class test_ufuncs(ScipyTestCase):
self.failUnless(eq(nonzero(x), [0]))
-class test_array_methods(ScipyTestCase):
+class test_array_methods(NumpyTestCase):
def setUp(self):
x = numpy.array([ 8.375, 7.545, 8.828, 8.5 , 1.757, 5.928,
@@ -854,5 +854,5 @@ def testinplace(x):
testinplace.test_name = 'Inplace operations'
if __name__ == "__main__":
- ScipyTest('numpy.core.ma').run()
+ NumpyTest('numpy.core.ma').run()
#timingTest()
diff --git a/numpy/core/tests/test_multiarray.py b/numpy/core/tests/test_multiarray.py
index 5daf9d86e..a8ef88ecc 100644
--- a/numpy/core/tests/test_multiarray.py
+++ b/numpy/core/tests/test_multiarray.py
@@ -3,7 +3,7 @@ from numpy.testing import *
from numpy.core import *
from numpy import random
-class test_flags(ScipyTestCase):
+class test_flags(NumpyTestCase):
def setUp(self):
self.a = arange(10)
@@ -27,7 +27,7 @@ class test_flags(ScipyTestCase):
assert_equal(self.a.flags.updateifcopy, False)
-class test_attributes(ScipyTestCase):
+class test_attributes(NumpyTestCase):
def setUp(self):
self.one = arange(10)
self.two = arange(20).reshape(4,5)
@@ -104,14 +104,14 @@ class test_attributes(ScipyTestCase):
x.fill(x[0])
assert_equal(x['f1'][1], x['f1'][0])
-class test_dtypedescr(ScipyTestCase):
+class test_dtypedescr(NumpyTestCase):
def check_construction(self):
d1 = dtype('i4')
assert_equal(d1, dtype(int32))
d2 = dtype('f8')
assert_equal(d2, dtype(float64))
-class test_fromstring(ScipyTestCase):
+class test_fromstring(NumpyTestCase):
def check_binary(self):
a = fromstring('\x00\x00\x80?\x00\x00\x00@\x00\x00@@\x00\x00\x80@',dtype='<f4')
assert_array_equal(a, array([1,2,3,4]))
@@ -121,7 +121,7 @@ class test_fromstring(ScipyTestCase):
b = fromstring('1,2,3,4',dtype=float,sep=',')
assert_array_equal(a,b)
-class test_zero_rank(ScipyTestCase):
+class test_zero_rank(NumpyTestCase):
def setUp(self):
self.d = array(0), array('x', object)
@@ -197,14 +197,14 @@ class test_zero_rank(ScipyTestCase):
x = array(2)
self.failUnlessRaises(ValueError, add, x, [1], x)
-class test_creation(ScipyTestCase):
+class test_creation(NumpyTestCase):
def check_from_attribute(self):
class x(object):
def __array__(self, dtype=None):
pass
self.failUnlessRaises(ValueError, array, x())
-class test_bool(ScipyTestCase):
+class test_bool(NumpyTestCase):
def check_test_interning(self):
a0 = bool_(0)
b0 = bool_(False)
@@ -216,7 +216,7 @@ class test_bool(ScipyTestCase):
self.failUnless(array(True)[()] is a1)
-class test_methods(ScipyTestCase):
+class test_methods(NumpyTestCase):
def check_test_round(self):
assert_equal(array([1.2,1.5]).round(), [1,2])
assert_equal(array(1.5).round(), 2)
@@ -230,13 +230,13 @@ class test_methods(ScipyTestCase):
self.failUnlessRaises(ValueError, lambda: a.transpose(0,0))
self.failUnlessRaises(ValueError, lambda: a.transpose(0,1,2))
-class test_subscripting(ScipyTestCase):
+class test_subscripting(NumpyTestCase):
def check_test_zero_rank(self):
x = array([1,2,3])
self.failUnless(isinstance(x[0], int))
self.failUnless(type(x[0, ...]) is ndarray)
-class test_pickling(ScipyTestCase):
+class test_pickling(NumpyTestCase):
def check_both(self):
import pickle
carray = array([[2,9],[7,0],[3,8]])
@@ -283,7 +283,7 @@ class test_pickling(ScipyTestCase):
p = loads(s)
assert_equal(a, p)
-class test_fancy_indexing(ScipyTestCase):
+class test_fancy_indexing(NumpyTestCase):
def check_list(self):
x = ones((1,1))
x[:,[0]] = 2.0
@@ -301,7 +301,7 @@ class test_fancy_indexing(ScipyTestCase):
x[:,:,(0,)] = 2.0
assert_array_equal(x, array([[[2.0]]]))
-class test_string_compare(ScipyTestCase):
+class test_string_compare(NumpyTestCase):
def check_string(self):
g1 = array(["This","is","example"])
g2 = array(["This","was","example"])
@@ -334,7 +334,7 @@ class test_string_compare(ScipyTestCase):
assert_array_equal(g1 > g2, [g1[i] > g2[i] for i in [0,1,2]])
-class test_argmax(ScipyTestCase):
+class test_argmax(NumpyTestCase):
def check_all(self):
a = random.normal(0,1,(4,5,6,7,8))
for i in xrange(a.ndim):
@@ -344,7 +344,7 @@ class test_argmax(ScipyTestCase):
axes.remove(i)
assert all(amax == aargmax.choose(*a.transpose(i,*axes)))
-class test_newaxis(ScipyTestCase):
+class test_newaxis(NumpyTestCase):
def check_basic(self):
sk = array([0,-0.1,0.1])
res = 250*sk[:,newaxis]
@@ -356,4 +356,4 @@ from test_unicode import *
restore_path()
if __name__ == "__main__":
- ScipyTest('numpy.core.multiarray').run()
+ NumpyTest('numpy.core.multiarray').run()
diff --git a/numpy/core/tests/test_umath.py b/numpy/core/tests/test_umath.py
index e26b231b2..3f6b43734 100644
--- a/numpy/core/tests/test_umath.py
+++ b/numpy/core/tests/test_umath.py
@@ -6,7 +6,7 @@ import numpy.core.umath as ncu
from numpy import zeros, ndarray, array, choose
restore_path()
-class test_power(ScipyTestCase):
+class test_power(NumpyTestCase):
def check_power_float(self):
x = array([1., 2., 3.])
assert_equal(x**0, [1., 1., 1.])
@@ -31,30 +31,30 @@ class test_power(ScipyTestCase):
assert_almost_equal(x**14, [-76443+16124j, 23161315+58317492j,
5583548873 + 2465133864j])
-class test_log1p(ScipyTestCase):
+class test_log1p(NumpyTestCase):
def check_log1p(self):
assert_almost_equal(ncu.log1p(0.2), ncu.log(1.2))
assert_almost_equal(ncu.log1p(1e-6), ncu.log(1+1e-6))
-class test_expm1(ScipyTestCase):
+class test_expm1(NumpyTestCase):
def check_expm1(self):
assert_almost_equal(ncu.expm1(0.2), ncu.exp(0.2)-1)
assert_almost_equal(ncu.expm1(1e-6), ncu.exp(1e-6)-1)
-class test_maximum(ScipyTestCase):
+class test_maximum(NumpyTestCase):
def check_reduce_complex(self):
assert_equal(maximum.reduce([1,2j]),1)
assert_equal(maximum.reduce([1+3j,2j]),1+3j)
-class test_minimum(ScipyTestCase):
+class test_minimum(NumpyTestCase):
def check_reduce_complex(self):
assert_equal(minimum.reduce([1,2j]),2j)
-class test_floating_point(ScipyTestCase):
+class test_floating_point(NumpyTestCase):
def check_floating_point(self):
assert_equal(ncu.FLOATING_POINT_SUPPORT, 1)
-class test_special_methods(ScipyTestCase):
+class test_special_methods(NumpyTestCase):
def test_wrap(self):
class with_wrap(object):
def __array__(self):
@@ -156,14 +156,14 @@ class test_special_methods(ScipyTestCase):
assert_equal(maximum(a, B()), 0)
assert_equal(maximum(a, C()), 0)
-class test_choose(ScipyTestCase):
+class test_choose(NumpyTestCase):
def test_mixed(self):
c = array([True,True])
a = array([True,True])
assert_equal(choose(c, (a, 1)), array([1,1]))
-class test_choose(ScipyTestCase):
+class test_choose(NumpyTestCase):
def test_attributes(self):
add = ncu.add
assert_equal(add.__name__, 'add')
@@ -175,4 +175,4 @@ class test_choose(ScipyTestCase):
assert_equal(add.identity, 0)
if __name__ == "__main__":
- ScipyTest().run()
+ NumpyTest().run()
diff --git a/numpy/core/tests/test_unicode.py b/numpy/core/tests/test_unicode.py
index 5072df268..a4a80482a 100644
--- a/numpy/core/tests/test_unicode.py
+++ b/numpy/core/tests/test_unicode.py
@@ -18,7 +18,7 @@ ucs4_value = u'\U0010FFFF'
# Creation tests
############################################################
-class create_zeros:
+class create_zeros(NumpyTestCase):
"""Check the creation of zero-valued arrays"""
def content_test(self, ua, ua_scalar, nbytes):
@@ -55,20 +55,20 @@ class create_zeros:
self.content_test(ua, ua[-1,-1,-1], 4*self.ulen*2*3*4)
-class test_create_zeros_1(create_zeros, NumpyTestCase):
+class test_create_zeros_1(create_zeros):
"""Check the creation of zero-valued arrays (size 1)"""
ulen = 1
-class test_create_zeros_2(create_zeros, NumpyTestCase):
+class test_create_zeros_2(create_zeros):
"""Check the creation of zero-valued arrays (size 2)"""
ulen = 2
-class test_create_zeros_1009(create_zeros, NumpyTestCase):
+class test_create_zeros_1009(create_zeros):
"""Check the creation of zero-valued arrays (size 1009)"""
ulen = 1009
-class create_values:
+class create_values(NumpyTestCase):
"""Check the creation of unicode arrays with values"""
def content_test(self, ua, ua_scalar, nbytes):
@@ -113,32 +113,32 @@ class create_values:
self.content_test(ua, ua[-1,-1,-1], 4*self.ulen*2*3*4)
-class test_create_values_1_ucs2(create_values, NumpyTestCase):
+class test_create_values_1_ucs2(create_values):
"""Check the creation of valued arrays (size 1, UCS2 values)"""
ulen = 1
ucs_value = ucs2_value
-class test_create_values_1_ucs4(create_values, NumpyTestCase):
+class test_create_values_1_ucs4(create_values):
"""Check the creation of valued arrays (size 1, UCS4 values)"""
ulen = 1
ucs_value = ucs4_value
-class test_create_values_2_ucs2(create_values, NumpyTestCase):
+class test_create_values_2_ucs2(create_values):
"""Check the creation of valued arrays (size 2, UCS2 values)"""
ulen = 2
ucs_value = ucs2_value
-class test_create_values_2_ucs4(create_values, NumpyTestCase):
+class test_create_values_2_ucs4(create_values):
"""Check the creation of valued arrays (size 2, UCS4 values)"""
ulen = 2
ucs_value = ucs4_value
-class test_create_values_1009_ucs2(create_values, NumpyTestCase):
+class test_create_values_1009_ucs2(create_values):
"""Check the creation of valued arrays (size 1009, UCS2 values)"""
ulen = 1009
ucs_value = ucs2_value
-class test_create_values_1009_ucs4(create_values, NumpyTestCase):
+class test_create_values_1009_ucs4(create_values):
"""Check the creation of valued arrays (size 1009, UCS4 values)"""
ulen = 1009
ucs_value = ucs4_value
@@ -148,7 +148,7 @@ class test_create_values_1009_ucs4(create_values, NumpyTestCase):
# Assignment tests
############################################################
-class assign_values:
+class assign_values(NumpyTestCase):
"""Check the assignment of unicode arrays with values"""
def content_test(self, ua, ua_scalar, nbytes):
@@ -198,32 +198,32 @@ class assign_values:
self.content_test(ua, ua[-1,-1,-1], 4*self.ulen*2*3*4)
-class test_assign_values_1_ucs2(assign_values, NumpyTestCase):
+class test_assign_values_1_ucs2(assign_values):
"""Check the assignment of valued arrays (size 1, UCS2 values)"""
ulen = 1
ucs_value = ucs2_value
-class test_assign_values_1_ucs4(assign_values, NumpyTestCase):
+class test_assign_values_1_ucs4(assign_values):
"""Check the assignment of valued arrays (size 1, UCS4 values)"""
ulen = 1
ucs_value = ucs4_value
-class test_assign_values_2_ucs2(assign_values, NumpyTestCase):
+class test_assign_values_2_ucs2(assign_values):
"""Check the assignment of valued arrays (size 2, UCS2 values)"""
ulen = 2
ucs_value = ucs2_value
-class test_assign_values_2_ucs4(assign_values, NumpyTestCase):
+class test_assign_values_2_ucs4(assign_values):
"""Check the assignment of valued arrays (size 2, UCS4 values)"""
ulen = 2
ucs_value = ucs4_value
-class test_assign_values_1009_ucs2(assign_values, NumpyTestCase):
+class test_assign_values_1009_ucs2(assign_values):
"""Check the assignment of valued arrays (size 1009, UCS2 values)"""
ulen = 1009
ucs_value = ucs2_value
-class test_assign_values_1009_ucs4(assign_values, NumpyTestCase):
+class test_assign_values_1009_ucs4(assign_values):
"""Check the assignment of valued arrays (size 1009, UCS4 values)"""
ulen = 1009
ucs_value = ucs4_value
@@ -233,7 +233,7 @@ class test_assign_values_1009_ucs4(assign_values, NumpyTestCase):
# Byteorder tests
############################################################
-class byteorder_values:
+class byteorder_values(NumpyTestCase):
"""Check the byteorder of unicode arrays in round-trip conversions"""
def check_values0D(self):
@@ -270,32 +270,32 @@ class byteorder_values:
# Arrays must be equal after the round-trip
assert_equal(ua, ua3)
-class test_byteorder_1_ucs2(byteorder_values, NumpyTestCase):
+class test_byteorder_1_ucs2(byteorder_values):
"""Check the byteorder in unicode (size 1, UCS2 values)"""
ulen = 1
ucs_value = ucs2_value
-class test_byteorder_1_ucs4(byteorder_values, NumpyTestCase):
+class test_byteorder_1_ucs4(byteorder_values):
"""Check the byteorder in unicode (size 1, UCS4 values)"""
ulen = 1
ucs_value = ucs4_value
-class test_byteorder_2_ucs2(byteorder_values, NumpyTestCase):
+class test_byteorder_2_ucs2(byteorder_values):
"""Check the byteorder in unicode (size 2, UCS2 values)"""
ulen = 2
ucs_value = ucs2_value
-class test_byteorder_2_ucs4(byteorder_values, NumpyTestCase):
+class test_byteorder_2_ucs4(byteorder_values):
"""Check the byteorder in unicode (size 2, UCS4 values)"""
ulen = 2
ucs_value = ucs4_value
-class test_byteorder_1009_ucs2(byteorder_values, NumpyTestCase):
+class test_byteorder_1009_ucs2(byteorder_values):
"""Check the byteorder in unicode (size 1009, UCS2 values)"""
ulen = 1009
ucs_value = ucs2_value
-class test_byteorder_1009_ucs4(byteorder_values, NumpyTestCase):
+class test_byteorder_1009_ucs4(byteorder_values):
"""Check the byteorder in unicode (size 1009, UCS4 values)"""
ulen = 1009
ucs_value = ucs4_value
diff --git a/numpy/dft/tests/test_helper.py b/numpy/dft/tests/test_helper.py
index 3742966c8..13f194c83 100644
--- a/numpy/dft/tests/test_helper.py
+++ b/numpy/dft/tests/test_helper.py
@@ -14,7 +14,7 @@ from numpy import pi
def random(size):
return rand(*size)
-class test_fftshift(ScipyTestCase):
+class test_fftshift(NumpyTestCase):
def check_definition(self):
x = [0,1,2,3,4,-4,-3,-2,-1]
@@ -31,7 +31,7 @@ class test_fftshift(ScipyTestCase):
x = random((n,))
assert_array_almost_equal(ifftshift(fftshift(x)),x)
-class test_fftfreq(ScipyTestCase):
+class test_fftfreq(NumpyTestCase):
def check_definition(self):
x = [0,1,2,3,4,-4,-3,-2,-1]
@@ -42,4 +42,4 @@ class test_fftfreq(ScipyTestCase):
assert_array_almost_equal(10*pi*fftfreq(10,pi),x)
if __name__ == "__main__":
- ScipyTest().run()
+ NumpyTest().run()
diff --git a/numpy/distutils/tests/f2py_ext/tests/test_fib2.py b/numpy/distutils/tests/f2py_ext/tests/test_fib2.py
index d9ed557fe..cbb0498d2 100644
--- a/numpy/distutils/tests/f2py_ext/tests/test_fib2.py
+++ b/numpy/distutils/tests/f2py_ext/tests/test_fib2.py
@@ -4,10 +4,10 @@ set_package_path()
from f2py_ext import fib2
del sys.path[0]
-class test_fib2(ScipyTestCase):
+class test_fib2(NumpyTestCase):
def check_fib(self):
assert_array_equal(fib2.fib(6),[0,1,1,2,3,5])
if __name__ == "__main__":
- ScipyTest(fib2).run()
+ NumpyTest(fib2).run()
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 06a3077c1..da52c8aff 100644
--- a/numpy/distutils/tests/f2py_f90_ext/tests/test_foo.py
+++ b/numpy/distutils/tests/f2py_f90_ext/tests/test_foo.py
@@ -4,10 +4,10 @@ set_package_path()
from f2py_f90_ext import foo
del sys.path[0]
-class test_foo(ScipyTestCase):
+class test_foo(NumpyTestCase):
def check_foo_free(self):
assert_equal(foo.foo_free.bar13(),13)
if __name__ == "__main__":
- ScipyTest().run()
+ NumpyTest().run()
diff --git a/numpy/distutils/tests/gen_ext/tests/test_fib3.py b/numpy/distutils/tests/gen_ext/tests/test_fib3.py
index 1d55a4e53..e1c1ff070 100644
--- a/numpy/distutils/tests/gen_ext/tests/test_fib3.py
+++ b/numpy/distutils/tests/gen_ext/tests/test_fib3.py
@@ -4,10 +4,10 @@ set_package_path()
from gen_ext import fib3
del sys.path[0]
-class test_fib3(ScipyTestCase):
+class test_fib3(NumpyTestCase):
def check_fib(self):
assert_array_equal(fib3.fib(6),[0,1,1,2,3,5])
if __name__ == "__main__":
- ScipyTest().run()
+ NumpyTest().run()
diff --git a/numpy/distutils/tests/pyrex_ext/tests/test_primes.py b/numpy/distutils/tests/pyrex_ext/tests/test_primes.py
index 4d3e01d81..bb1e4c332 100644
--- a/numpy/distutils/tests/pyrex_ext/tests/test_primes.py
+++ b/numpy/distutils/tests/pyrex_ext/tests/test_primes.py
@@ -5,9 +5,9 @@ set_package_path()
from pyrex_ext.primes import primes
restore_path()
-class test_primes(ScipyTestCase):
+class test_primes(NumpyTestCase):
def check_simple(self, level=1):
l = primes(10)
assert_equal(l, [2, 3, 5, 7, 11, 13, 17, 19, 23, 29])
if __name__ == "__main__":
- ScipyTest().run()
+ NumpyTest().run()
diff --git a/numpy/distutils/tests/swig_ext/tests/test_example.py b/numpy/distutils/tests/swig_ext/tests/test_example.py
index 41c8512b2..71cb3d2c5 100644
--- a/numpy/distutils/tests/swig_ext/tests/test_example.py
+++ b/numpy/distutils/tests/swig_ext/tests/test_example.py
@@ -4,7 +4,7 @@ set_package_path()
from swig_ext import example
restore_path()
-class test_example(ScipyTestCase):
+class test_example(NumpyTestCase):
def check_fact(self):
assert_equal(example.fact(10),3628800)
@@ -15,4 +15,4 @@ class test_example(ScipyTestCase):
assert_equal(example.cvar.My_variable,5.0)
if __name__ == "__main__":
- ScipyTest().run()
+ NumpyTest().run()
diff --git a/numpy/distutils/tests/swig_ext/tests/test_example2.py b/numpy/distutils/tests/swig_ext/tests/test_example2.py
index 3871e1776..1d8e73a12 100644
--- a/numpy/distutils/tests/swig_ext/tests/test_example2.py
+++ b/numpy/distutils/tests/swig_ext/tests/test_example2.py
@@ -4,7 +4,7 @@ set_package_path()
from swig_ext import example2
restore_path()
-class test_example2(ScipyTestCase):
+class test_example2(NumpyTestCase):
def check_zoo(self):
z = example2.Zoo()
@@ -14,4 +14,4 @@ class test_example2(ScipyTestCase):
if __name__ == "__main__":
- ScipyTest().run()
+ NumpyTest().run()
diff --git a/numpy/distutils/tests/test_misc_util.py b/numpy/distutils/tests/test_misc_util.py
index e4c544816..b75eb8cf2 100644
--- a/numpy/distutils/tests/test_misc_util.py
+++ b/numpy/distutils/tests/test_misc_util.py
@@ -8,7 +8,7 @@ from os.path import join, sep
ajoin = lambda *paths: join(*((sep,)+paths))
-class test_appendpath(ScipyTestCase):
+class test_appendpath(NumpyTestCase):
def check_1(self):
assert_equal(appendpath('prefix','name'),join('prefix','name'))
@@ -32,7 +32,7 @@ class test_appendpath(ScipyTestCase):
assert_equal(appendpath('/prefix/sub/sub2','/prefix/sub/sup/name'),
ajoin('prefix','sub','sub2','sup','name'))
-class test_minrelpath(ScipyTestCase):
+class test_minrelpath(NumpyTestCase):
def check_1(self):
import os
@@ -57,4 +57,4 @@ class test_gpaths(NumpyTestCase):
assert os.path.join(local_path,'system_info.py')==f[0],`f`
if __name__ == "__main__":
- ScipyTest().run()
+ NumpyTest().run()
diff --git a/numpy/f2py/tests/array_from_pyobj/tests/test_array_from_pyobj.py b/numpy/f2py/tests/array_from_pyobj/tests/test_array_from_pyobj.py
index a2478784a..e1d4a47a6 100644
--- a/numpy/f2py/tests/array_from_pyobj/tests/test_array_from_pyobj.py
+++ b/numpy/f2py/tests/array_from_pyobj/tests/test_array_from_pyobj.py
@@ -512,4 +512,4 @@ class test_%s_gen(unittest.TestCase,
''' % (t,t,t)
if __name__ == "__main__":
- ScipyTest().run()
+ NumpyTest().run()
diff --git a/numpy/lib/tests/test_arraysetops.py b/numpy/lib/tests/test_arraysetops.py
index 22f0a043c..706564410 100644
--- a/numpy/lib/tests/test_arraysetops.py
+++ b/numpy/lib/tests/test_arraysetops.py
@@ -10,7 +10,7 @@ restore_path()
##################################################
-class test_aso( ScipyTestCase ):
+class test_aso(NumpyTestCase):
##
# 03.11.2005, c
def check_unique1d( self ):
@@ -142,4 +142,4 @@ class test_aso( ScipyTestCase ):
assert_array_equal( c1, c2 )
if __name__ == "__main__":
- ScipyTest().run()
+ NumpyTest().run()
diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py
index 1c99eaa18..b359d5732 100644
--- a/numpy/lib/tests/test_function_base.py
+++ b/numpy/lib/tests/test_function_base.py
@@ -360,4 +360,4 @@ def compare_results(res,desired):
assert_array_equal(res[i],desired[i])
if __name__ == "__main__":
- ScipyTest('numpy.lib.function_base').run()
+ NumpyTest('numpy.lib.function_base').run()
diff --git a/numpy/lib/tests/test_getlimits.py b/numpy/lib/tests/test_getlimits.py
index f70081518..1eaadc953 100644
--- a/numpy/lib/tests/test_getlimits.py
+++ b/numpy/lib/tests/test_getlimits.py
@@ -10,29 +10,29 @@ restore_path()
##################################################
-class test_python_float(ScipyTestCase):
+class test_python_float(NumpyTestCase):
def check_singleton(self):
ftype = finfo(float)
ftype2 = finfo(float)
assert_equal(id(ftype),id(ftype2))
-class test_single(ScipyTestCase):
+class test_single(NumpyTestCase):
def check_singleton(self):
ftype = finfo(single)
ftype2 = finfo(single)
assert_equal(id(ftype),id(ftype2))
-class test_double(ScipyTestCase):
+class test_double(NumpyTestCase):
def check_singleton(self):
ftype = finfo(double)
ftype2 = finfo(double)
assert_equal(id(ftype),id(ftype2))
-class test_longdouble(ScipyTestCase):
+class test_longdouble(NumpyTestCase):
def check_singleton(self,level=2):
ftype = finfo(longdouble)
ftype2 = finfo(longdouble)
assert_equal(id(ftype),id(ftype2))
if __name__ == "__main__":
- ScipyTest().run()
+ NumpyTest().run()
diff --git a/numpy/lib/tests/test_index_tricks.py b/numpy/lib/tests/test_index_tricks.py
index cdf20fcf9..e0be41d8a 100644
--- a/numpy/lib/tests/test_index_tricks.py
+++ b/numpy/lib/tests/test_index_tricks.py
@@ -4,7 +4,7 @@ set_package_path()
from numpy import array, ones, r_, mgrid
restore_path()
-class test_grid(ScipyTestCase):
+class test_grid(NumpyTestCase):
def check_basic(self):
a = mgrid[-1:1:10j]
b = mgrid[-1:1:0.1]
@@ -29,7 +29,7 @@ class test_grid(ScipyTestCase):
assert_array_almost_equal(d[0,1,:]-d[0,0,:], 0.1*ones(20,'d'),11)
assert_array_almost_equal(d[1,:,1]-d[1,:,0], 0.2*ones(20,'d'),11)
-class test_concatenator(ScipyTestCase):
+class test_concatenator(NumpyTestCase):
def check_1d(self):
assert_array_equal(r_[1,2,3,4,5,6],array([1,2,3,4,5,6]))
b = ones(5)
@@ -49,4 +49,4 @@ class test_concatenator(ScipyTestCase):
assert_array_equal(d[5:,:],c)
if __name__ == "__main__":
- ScipyTest().run()
+ NumpyTest().run()
diff --git a/numpy/lib/tests/test_polynomial.py b/numpy/lib/tests/test_polynomial.py
index 75fcaecfb..c7609c3d5 100644
--- a/numpy/lib/tests/test_polynomial.py
+++ b/numpy/lib/tests/test_polynomial.py
@@ -79,4 +79,4 @@ class test_docs(NumpyTestCase):
def check_doctests(self): return self.rundocs()
if __name__ == "__main__":
- ScipyTest().run()
+ NumpyTest().run()
diff --git a/numpy/lib/tests/test_shape_base.py b/numpy/lib/tests/test_shape_base.py
index 984c63484..debd3ae8e 100644
--- a/numpy/lib/tests/test_shape_base.py
+++ b/numpy/lib/tests/test_shape_base.py
@@ -6,7 +6,7 @@ from numpy.lib import *
from numpy.core import *
restore_path()
-class test_apply_along_axis(ScipyTestCase):
+class test_apply_along_axis(NumpyTestCase):
def check_simple(self):
a = ones((20,10),'d')
assert_array_equal(apply_along_axis(len,0,a),len(a)*ones(shape(a)[1]))
@@ -16,7 +16,7 @@ class test_apply_along_axis(ScipyTestCase):
a = ones((10,101),'d')
assert_array_equal(apply_along_axis(len,0,a),len(a)*ones(shape(a)[1]))
-class test_array_split(ScipyTestCase):
+class test_array_split(NumpyTestCase):
def check_integer_0_split(self):
a = arange(10)
try:
@@ -119,7 +119,7 @@ class test_array_split(ScipyTestCase):
array([]),array([])]
compare_results(res,desired)
-class test_split(ScipyTestCase):
+class test_split(NumpyTestCase):
"""* This function is essentially the same as array_split,
except that it test if splitting will result in an
equal split. Only test for this case.
@@ -138,7 +138,7 @@ class test_split(ScipyTestCase):
except ValueError:
pass
-class test_atleast_1d(ScipyTestCase):
+class test_atleast_1d(NumpyTestCase):
def check_0D_array(self):
a = array(1); b = array(2);
res=map(atleast_1d,[a,b])
@@ -169,7 +169,7 @@ class test_atleast_1d(ScipyTestCase):
assert(atleast_1d(3.0).shape == (1,))
assert(atleast_1d([[2,3],[4,5]]).shape == (2,2))
-class test_atleast_2d(ScipyTestCase):
+class test_atleast_2d(NumpyTestCase):
def check_0D_array(self):
a = array(1); b = array(2);
res=map(atleast_2d,[a,b])
@@ -198,7 +198,7 @@ class test_atleast_2d(ScipyTestCase):
assert(atleast_2d([3j,1]).shape == (1,2))
assert(atleast_2d([[[3,1],[4,5]],[[3,5],[1,2]]]).shape == (2,2,2))
-class test_atleast_3d(ScipyTestCase):
+class test_atleast_3d(NumpyTestCase):
def check_0D_array(self):
a = array(1); b = array(2);
res=map(atleast_3d,[a,b])
@@ -221,7 +221,7 @@ class test_atleast_3d(ScipyTestCase):
desired = [a,b]
assert_array_equal(res,desired)
-class test_hstack(ScipyTestCase):
+class test_hstack(NumpyTestCase):
def check_0D_array(self):
a = array(1); b = array(2);
res=hstack([a,b])
@@ -238,7 +238,7 @@ class test_hstack(ScipyTestCase):
desired = array([[1,1],[2,2]])
assert_array_equal(res,desired)
-class test_vstack(ScipyTestCase):
+class test_vstack(NumpyTestCase):
def check_0D_array(self):
a = array(1); b = array(2);
res=vstack([a,b])
@@ -260,7 +260,7 @@ class test_vstack(ScipyTestCase):
desired = array([[1,2],[1,2]])
assert_array_equal(res,desired)
-class test_dstack(ScipyTestCase):
+class test_dstack(NumpyTestCase):
def check_0D_array(self):
a = array(1); b = array(2);
res=dstack([a,b])
@@ -285,7 +285,7 @@ class test_dstack(ScipyTestCase):
""" array_split has more comprehensive test of splitting.
only do simple test on hsplit, vsplit, and dsplit
"""
-class test_hsplit(ScipyTestCase):
+class test_hsplit(NumpyTestCase):
""" only testing for integer splits.
"""
def check_0D_array(self):
@@ -307,7 +307,7 @@ class test_hsplit(ScipyTestCase):
desired = [array([[1,2],[1,2]]),array([[3,4],[3,4]])]
compare_results(res,desired)
-class test_vsplit(ScipyTestCase):
+class test_vsplit(NumpyTestCase):
""" only testing for integer splits.
"""
def check_1D_array(self):
@@ -324,7 +324,7 @@ class test_vsplit(ScipyTestCase):
desired = [array([[1,2,3,4]]),array([[1,2,3,4]])]
compare_results(res,desired)
-class test_dsplit(ScipyTestCase):
+class test_dsplit(NumpyTestCase):
""" only testing for integer splits.
"""
def check_2D_array(self):
@@ -345,7 +345,7 @@ class test_dsplit(ScipyTestCase):
array([[[3,4],[3,4]],[[3,4],[3,4]]])]
compare_results(res,desired)
-class test_squeeze(ScipyTestCase):
+class test_squeeze(NumpyTestCase):
def check_basic(self):
a = rand(20,10,10,1,1)
b = rand(20,1,10,1,20)
@@ -354,7 +354,7 @@ class test_squeeze(ScipyTestCase):
assert_array_equal(squeeze(b),reshape(b,(20,10,20)))
assert_array_equal(squeeze(c),reshape(c,(20,10)))
-class test_kron(ScipyTestCase):
+class test_kron(NumpyTestCase):
def check_return_type(self):
a = ones([2,2])
m = asmatrix(a)
@@ -394,4 +394,4 @@ def compare_results(res,desired):
if __name__ == "__main__":
- ScipyTest().run()
+ NumpyTest().run()
diff --git a/numpy/lib/tests/test_type_check.py b/numpy/lib/tests/test_type_check.py
index 6d93989e5..b95760c8b 100644
--- a/numpy/lib/tests/test_type_check.py
+++ b/numpy/lib/tests/test_type_check.py
@@ -11,7 +11,7 @@ restore_path()
def assert_all(x):
assert(all(x)), x
-class test_mintypecode(ScipyTestCase):
+class test_mintypecode(NumpyTestCase):
def check_default_1(self):
for itype in '1bcsuwil':
@@ -60,7 +60,7 @@ class test_mintypecode(ScipyTestCase):
#assert_equal(mintypecode('idF',savespace=1),'F')
assert_equal(mintypecode('idD'),'D')
-class test_isscalar(ScipyTestCase):
+class test_isscalar(NumpyTestCase):
def check_basic(self):
assert(isscalar(3))
assert(not isscalar([3]))
@@ -69,7 +69,7 @@ class test_isscalar(ScipyTestCase):
assert(isscalar(10L))
assert(isscalar(4.0))
-class test_real(ScipyTestCase):
+class test_real(NumpyTestCase):
def check_real(self):
y = rand(10,)
assert_array_equal(y,real(y))
@@ -78,7 +78,7 @@ class test_real(ScipyTestCase):
y = rand(10,)+1j*rand(10,)
assert_array_equal(y.real,real(y))
-class test_imag(ScipyTestCase):
+class test_imag(NumpyTestCase):
def check_real(self):
y = rand(10,)
assert_array_equal(0,imag(y))
@@ -87,7 +87,7 @@ class test_imag(ScipyTestCase):
y = rand(10,)+1j*rand(10,)
assert_array_equal(y.imag,imag(y))
-class test_iscomplex(ScipyTestCase):
+class test_iscomplex(NumpyTestCase):
def check_fail(self):
z = array([-1,0,1])
res = iscomplex(z)
@@ -97,7 +97,7 @@ class test_iscomplex(ScipyTestCase):
res = iscomplex(z)
assert_array_equal(res,[1,0,0])
-class test_isreal(ScipyTestCase):
+class test_isreal(NumpyTestCase):
def check_pass(self):
z = array([-1,0,1j])
res = isreal(z)
@@ -107,21 +107,21 @@ class test_isreal(ScipyTestCase):
res = isreal(z)
assert_array_equal(res,[0,1,1])
-class test_iscomplexobj(ScipyTestCase):
+class test_iscomplexobj(NumpyTestCase):
def check_basic(self):
z = array([-1,0,1])
assert(not iscomplexobj(z))
z = array([-1j,0,-1])
assert(iscomplexobj(z))
-class test_isrealobj(ScipyTestCase):
+class test_isrealobj(NumpyTestCase):
def check_basic(self):
z = array([-1,0,1])
assert(isrealobj(z))
z = array([-1j,0,-1])
assert(not isrealobj(z))
-class test_isnan(ScipyTestCase):
+class test_isnan(NumpyTestCase):
def check_goodvalues(self):
z = array((-1.,0.,1.))
res = isnan(z) == 0
@@ -141,7 +141,7 @@ class test_isnan(ScipyTestCase):
def check_complex1(self):
assert_all(isnan(array(0+0j)/0.) == 1)
-class test_isfinite(ScipyTestCase):
+class test_isfinite(NumpyTestCase):
def check_goodvalues(self):
z = array((-1.,0.,1.))
res = isfinite(z) == 1
@@ -161,7 +161,7 @@ class test_isfinite(ScipyTestCase):
def check_complex1(self):
assert_all(isfinite(array(1+1j)/0.) == 0)
-class test_isinf(ScipyTestCase):
+class test_isinf(NumpyTestCase):
def check_goodvalues(self):
z = array((-1.,0.,1.))
res = isinf(z) == 0
@@ -180,21 +180,21 @@ class test_isinf(ScipyTestCase):
# assert_all(isinf(log(-1.)) == 0)
# assert_all(isnan(log(-1.)) == 1)
-class test_isposinf(ScipyTestCase):
+class test_isposinf(NumpyTestCase):
def check_generic(self):
vals = isposinf(array((-1.,0,1))/0.)
assert(vals[0] == 0)
assert(vals[1] == 0)
assert(vals[2] == 1)
-class test_isneginf(ScipyTestCase):
+class test_isneginf(NumpyTestCase):
def check_generic(self):
vals = isneginf(array((-1.,0,1))/0.)
assert(vals[0] == 1)
assert(vals[1] == 0)
assert(vals[2] == 0)
-class test_nan_to_num(ScipyTestCase):
+class test_nan_to_num(NumpyTestCase):
def check_generic(self):
vals = nan_to_num(array((-1.,0,1))/0.)
assert_all(vals[0] < -1e10) and assert_all(isfinite(vals[0]))
@@ -224,7 +224,7 @@ class test_nan_to_num(ScipyTestCase):
#assert_all(vals.real < -1e10) and assert_all(isfinite(vals))
-class test_real_if_close(ScipyTestCase):
+class test_real_if_close(NumpyTestCase):
def check_basic(self):
a = rand(10)
b = real_if_close(a+1e-15j)
@@ -236,4 +236,4 @@ class test_real_if_close(ScipyTestCase):
assert_all(isrealobj(b))
if __name__ == "__main__":
- ScipyTest().run()
+ NumpyTest().run()