diff options
Diffstat (limited to 'numpy/testing/numpytest.py')
-rw-r--r-- | numpy/testing/numpytest.py | 30 |
1 files changed, 7 insertions, 23 deletions
diff --git a/numpy/testing/numpytest.py b/numpy/testing/numpytest.py index 4fa9364b1..2120975df 100644 --- a/numpy/testing/numpytest.py +++ b/numpy/testing/numpytest.py @@ -1,36 +1,20 @@ from __future__ import division, absolute_import, print_function import os -import sys -import traceback +import warnings -__all__ = ['IgnoreException', 'importall',] +__all__ = ['importall'] -DEBUG=0 -get_frame = sys._getframe - -class IgnoreException(Exception): - "Ignoring this exception due to disabled feature" - - -def output_exception(printstream = sys.stdout): - try: - type, value, tb = sys.exc_info() - info = traceback.extract_tb(tb) - #this is more verbose - #traceback.print_exc() - filename, lineno, function, text = info[-1] # last line only - msg = "%s:%d: %s: %s (in %s)\n" % ( - filename, lineno, type.__name__, str(value), function) - printstream.write(msg) - finally: - type = value = tb = None # clean up - return def importall(package): """ + `importall` is DEPRECATED and will be removed in numpy 1.9.0 + Try recursively to import all subpackages under package. """ + warnings.warn("`importall is deprecated, and will be remobed in numpy 1.9.0", + DeprecationWarning) + if isinstance(package,str): package = __import__(package) |