summaryrefslogtreecommitdiff
path: root/scipy/weave/tests/test_inline_tools.py
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2006-01-02 08:26:24 +0000
committerTravis Oliphant <oliphant@enthought.com>2006-01-02 08:26:24 +0000
commit4712a37b93832933a46376ee99339f9040ba3670 (patch)
tree8a3de8500925061b0f2368fae2d50159dbea206f /scipy/weave/tests/test_inline_tools.py
parentb5ba0003def4cfa43b29d29df8f085d09609707b (diff)
downloadnumpy-4712a37b93832933a46376ee99339f9040ba3670.tar.gz
Moved weave to scipy
Diffstat (limited to 'scipy/weave/tests/test_inline_tools.py')
-rw-r--r--scipy/weave/tests/test_inline_tools.py46
1 files changed, 0 insertions, 46 deletions
diff --git a/scipy/weave/tests/test_inline_tools.py b/scipy/weave/tests/test_inline_tools.py
deleted file mode 100644
index 4ce7bfa1c..000000000
--- a/scipy/weave/tests/test_inline_tools.py
+++ /dev/null
@@ -1,46 +0,0 @@
-
-from scipy.base import *
-
-from scipy.testing import *
-set_package_path()
-from weave import inline_tools
-restore_path()
-set_local_path()
-from test_scxx import *
-restore_path()
-
-class test_inline(ScipyTestCase):
- """ These are long running tests...
-
- I'd like to benchmark these things somehow.
- """
- def check_exceptions(self,level=5):
- a = 3
- code = """
- if (a < 2)
- throw_error(PyExc_ValueError,
- "the variable 'a' should not be less than 2");
- else
- return_val = PyInt_FromLong(a+1);
- """
- result = inline_tools.inline(code,['a'])
- assert(result == 4)
-
- try:
- a = 1
- result = inline_tools.inline(code,['a'])
- assert(1) # should've thrown a ValueError
- except ValueError:
- pass
-
- from distutils.errors import DistutilsError, CompileError
- try:
- a = 'string'
- result = inline_tools.inline(code,['a'])
- assert(1) # should've gotten an error
- except:
- # ?CompileError is the error reported, but catching it doesn't work
- pass
-
-if __name__ == "__main__":
- ScipyTest().run()