summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcookedm <cookedm@localhost>2006-07-18 07:11:08 +0000
committercookedm <cookedm@localhost>2006-07-18 07:11:08 +0000
commitae4de66c4d02e6616750b04e2fed76805fab14e0 (patch)
treedab5753fb3b92f20df7c76bcd2d51897e6e679cb
parent5211f02f2b0f8882fe5177796f6d9d2b0be86062 (diff)
downloadnumpy-ae4de66c4d02e6616750b04e2fed76805fab14e0.tar.gz
Add test that scalar types work (i.e., scalartype(number) == number)
PPC OS X fails this for longdouble.
-rw-r--r--numpy/core/tests/test_scalarmath.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/numpy/core/tests/test_scalarmath.py b/numpy/core/tests/test_scalarmath.py
index 6b74a20bb..078114dae 100644
--- a/numpy/core/tests/test_scalarmath.py
+++ b/numpy/core/tests/test_scalarmath.py
@@ -15,6 +15,11 @@ types = [N.bool_, N.byte, N.ubyte, N.short, N.ushort, N.intc, N.uintc,
class test_types(NumpyTestCase):
def check_types(self, level=1):
+ for atype in types:
+ a = atype(1)
+ assert a == 1, "error with %r: got %r" % (atype,a)
+
+ def check_type_add(self, level=1):
# list of types
for k, atype in enumerate(types):
vala = atype(3)