From 2f18f9d6834c1eeaf7a234f2810c8c1ba37c7abf Mon Sep 17 00:00:00 2001 From: Robert Kern Date: Thu, 3 Jul 2008 20:21:20 +0000 Subject: Correct the oldnumeric typecodes, update the tests to work on 32-bit machines, make sure these tests are installed with numpy so they can be run with numpy.test(). --- numpy/oldnumeric/tests/test_oldnumeric.py | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) (limited to 'numpy/oldnumeric/tests/test_oldnumeric.py') diff --git a/numpy/oldnumeric/tests/test_oldnumeric.py b/numpy/oldnumeric/tests/test_oldnumeric.py index 18c970235..24d709d2c 100644 --- a/numpy/oldnumeric/tests/test_oldnumeric.py +++ b/numpy/oldnumeric/tests/test_oldnumeric.py @@ -51,9 +51,13 @@ class test_oldtypes(unittest.TestCase): a1 = array([0,1,0], Int32) a2 = array([0,1,0], int32) assert_array_equal(a1, a2) - a1 = array([0,1,0], Int64) - a2 = array([0,1,0], int64) - assert_array_equal(a1, a2) + try: + a1 = array([0,1,0], Int64) + a2 = array([0,1,0], int64) + assert_array_equal(a1, a2) + except NameError: + # Not all systems have 64-bit integers. + pass a1 = array([0,1,0], UnsignedInt) a2 = array([0,1,0], UnsignedInteger) a3 = array([0,1,0], uint) @@ -74,15 +78,17 @@ class test_oldtypes(unittest.TestCase): a3 = array([0,1,0], uint32) assert_array_equal(a1, a3) assert_array_equal(a2, a3) - a1 = array([0,1,0], UInt64) - a2 = array([0,1,0], UnsignedInt64) - a3 = array([0,1,0], uint64) - assert_array_equal(a1, a3) - assert_array_equal(a2, a3) - a1 = array([0,1,0], Bool) - a2 = array([0,1,0], bool) - assert_array_equal(a1, a2) + try: + a1 = array([0,1,0], UInt64) + a2 = array([0,1,0], UnsignedInt64) + a3 = array([0,1,0], uint64) + assert_array_equal(a1, a3) + assert_array_equal(a2, a3) + except NameError: + # Not all systems have 64-bit integers. + pass if __name__ == "__main__": - run_module_suite() + import nose + nose.main() -- cgit v1.2.1