summaryrefslogtreecommitdiff
path: root/numpy/testing/nosetester.py
diff options
context:
space:
mode:
authorAlan McIntyre <alan.mcintyre@local>2008-07-21 06:55:48 +0000
committerAlan McIntyre <alan.mcintyre@local>2008-07-21 06:55:48 +0000
commit8e86b69357c931b9dc0544d0210f7b2a0720ef11 (patch)
tree0e2edf22cd0867ac75a6dfd4d54adeaccb14c313 /numpy/testing/nosetester.py
parent77effddb80562fa5e2de16ac4fb5470477bda652 (diff)
downloadnumpy-8e86b69357c931b9dc0544d0210f7b2a0720ef11.tar.gz
Added numpy.testing.verbose, to allow tests to vary output accordingly.
Added numpy.testing.print_assert_equal, to allow removing the multiple identical implementations of this function in SciPy tests. Display version info for NumPy, Python, and nose (and SciPy when running SciPy tests), in a manner similar to the original test framework.
Diffstat (limited to 'numpy/testing/nosetester.py')
-rw-r--r--numpy/testing/nosetester.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/numpy/testing/nosetester.py b/numpy/testing/nosetester.py
index 4d2cb0523..3465fd3ef 100644
--- a/numpy/testing/nosetester.py
+++ b/numpy/testing/nosetester.py
@@ -183,6 +183,9 @@ class NoseTester(object):
# cap verbosity at 3 because nose becomes *very* verbose beyond that
verbose = min(verbose, 3)
+ import utils
+ utils.verbose = verbose
+
# if all evaluates as True, omit attribute filter and run doctests
if kwargs.get('all'):
label = ''
@@ -215,6 +218,21 @@ class NoseTester(object):
nose = import_nose()
+ import numpy
+ print "NumPy version %s" % numpy.__version__
+ npdir = os.path.dirname(numpy.__file__)
+ print "NumPy is installed in %s" % npdir
+
+ if 'scipy' in self.package_name:
+ import scipy
+ print "SciPy version %s" % scipy.__version__
+ spdir = os.path.dirname(scipy.__file__)
+ print "SciPy is installed in %s" % spdir
+
+ pyversion = sys.version.replace('\n','')
+ print "Python version %s" % pyversion
+ print "nose version %d.%d.%d" % nose.__versioninfo__
+
# Because nose currently discards the test result object, but we need
# to return it to the user, override TestProgram.runTests to retain
# the result