summaryrefslogtreecommitdiff
path: root/weave/tests/test_standard_array_spec.py
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2005-09-26 20:20:16 +0000
committerTravis Oliphant <oliphant@enthought.com>2005-09-26 20:20:16 +0000
commit45d01a4be1c4221132ba46d687e6af3a8df3329b (patch)
treece3be5290e918def7c7187e747c5460193b0ca85 /weave/tests/test_standard_array_spec.py
parentccd1c3db37672627aa4fe0fdb5437f5dddc0fe86 (diff)
downloadnumpy-45d01a4be1c4221132ba46d687e6af3a8df3329b.tar.gz
Moved weave
Diffstat (limited to 'weave/tests/test_standard_array_spec.py')
-rw-r--r--weave/tests/test_standard_array_spec.py47
1 files changed, 0 insertions, 47 deletions
diff --git a/weave/tests/test_standard_array_spec.py b/weave/tests/test_standard_array_spec.py
deleted file mode 100644
index 5ce5667b2..000000000
--- a/weave/tests/test_standard_array_spec.py
+++ /dev/null
@@ -1,47 +0,0 @@
-import unittest
-from scipy_base.numerix import *
-from scipy_base.numerix import RandomArray
-import time
-
-from scipy_test.testing import *
-set_package_path()
-from weave import standard_array_spec
-restore_path()
-
-def remove_whitespace(in_str):
- import string
- out = string.replace(in_str," ","")
- out = string.replace(out,"\t","")
- out = string.replace(out,"\n","")
- return out
-
-def print_assert_equal(test_string,actual,desired):
- """this should probably be in scipy_test.testing
- """
- import pprint
- try:
- assert(actual == desired)
- except AssertionError:
- import cStringIO
- msg = cStringIO.StringIO()
- msg.write(test_string)
- msg.write(' failed\nACTUAL: \n')
- pprint.pprint(actual,msg)
- msg.write('DESIRED: \n')
- pprint.pprint(desired,msg)
- raise AssertionError, msg.getvalue()
-
-class test_array_converter(unittest.TestCase):
- def check_type_match_string(self):
- s = standard_array_spec.array_converter()
- assert( not s.type_match('string') )
- def check_type_match_int(self):
- s = standard_array_spec.array_converter()
- assert(not s.type_match(5))
- def check_type_match_array(self):
- s = standard_array_spec.array_converter()
- assert(s.type_match(arange(4)))
-
-if __name__ == "__main__":
- ScipyTest('weave.standard_array_spec').run()
-