summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorStefan van der Walt <stefan@sun.ac.za>2007-12-15 02:43:35 +0000
committerStefan van der Walt <stefan@sun.ac.za>2007-12-15 02:43:35 +0000
commitbe2d0cacfcf64c25a1dd76e9817ad0cf024d0576 (patch)
treee6c11e1835a55af426d2d9ea35e2910181bab612 /numpy
parentfc1506199914b4fcdd2dfb930d9ddc0ee2ee9569 (diff)
downloadnumpy-be2d0cacfcf64c25a1dd76e9817ad0cf024d0576.tar.gz
Pull in old tests.
Diffstat (limited to 'numpy')
-rw-r--r--numpy/ma/tests/test_core.py2
-rw-r--r--numpy/ma/tests/test_old_ma.py (renamed from numpy/core/tests/test_ma.py)16
2 files changed, 10 insertions, 8 deletions
diff --git a/numpy/ma/tests/test_core.py b/numpy/ma/tests/test_core.py
index b70c40996..0eb75d224 100644
--- a/numpy/ma/tests/test_core.py
+++ b/numpy/ma/tests/test_core.py
@@ -27,6 +27,8 @@ from numpy.ma.core import *
pi = numpy.pi
+from test_old_ma import *
+
#..............................................................................
class TestMA(NumpyTestCase):
"Base test class for MaskedArrays."
diff --git a/numpy/core/tests/test_ma.py b/numpy/ma/tests/test_old_ma.py
index ed7cb2a79..5f383c67c 100644
--- a/numpy/core/tests/test_ma.py
+++ b/numpy/ma/tests/test_old_ma.py
@@ -1,6 +1,6 @@
import numpy
import types, time
-from numpy.core.ma import *
+from numpy.ma import *
from numpy.core.numerictypes import float32
from numpy.testing import NumpyTestCase, NumpyTest
pi = numpy.pi
@@ -250,16 +250,16 @@ class TestMa(NumpyTestCase):
x1 = numpy.arange(5)
y1 = array(x1, mask=m)
- self.failUnless( y1.raw_data() is not x1)
- self.failUnless( allequal(x1,y1.raw_data()))
+ self.failUnless( y1.data is not x1)
+ self.failUnless( allequal(x1,y1.data))
self.failUnless( y1.mask is m)
y1a = array(y1, copy=0)
- self.failUnless( y1a.raw_data() is y1.raw_data())
+ self.failUnless( y1a.data is y1.data)
self.failUnless( y1a.mask is y1.mask)
y2 = array(x1, mask=m, copy=0)
- self.failUnless( y2.raw_data() is x1)
+ self.failUnless( y2.data is x1)
self.failUnless( y2.mask is m)
self.failUnless( y2[2] is masked)
y2[2]=9
@@ -490,9 +490,9 @@ class TestMa(NumpyTestCase):
x = arange(10).astype(float32)
xm = arange(10)
xm[2] = masked
- id1 = id(x.raw_data())
+ id1 = id(x.data)
x += 1.
- assert id1 == id(x.raw_data())
+ assert id1 == id(x.data)
assert eq(x, y+1.)
def check_testPickle(self):
@@ -869,5 +869,5 @@ def testinplace(x):
testinplace.test_name = 'Inplace operations'
if __name__ == "__main__":
- NumpyTest('numpy.core.ma').run()
+ NumpyTest('numpy.ma').run()
#timingTest()