diff options
author | Ralf Gommers <ralf.gommers@googlemail.com> | 2013-08-10 10:42:59 +0200 |
---|---|---|
committer | Ralf Gommers <ralf.gommers@googlemail.com> | 2013-08-10 10:50:36 +0200 |
commit | d6e8c91cc8d4cf173f7378eba69bcf1e933dd879 (patch) | |
tree | c07011b060d5c8639f2aa24b3f664134e4065451 /numpy/testing/numpytest.py | |
parent | 928289bf37081f4deb6755e226600998ccc23610 (diff) | |
download | numpy-d6e8c91cc8d4cf173f7378eba69bcf1e933dd879.tar.gz |
MAINT: remove unused and broken parts of numpy.testing
Deprecate np.testing.importall - it's pointless and partially broken.
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) |