Files
scikit-image/skimage/_shared/testing.py
T
Tony S Yu 2cbe2e1f20 DOC: Fix attribution for testing function
The testing functions taken from scikit-learn were in a file with a copyright assigned to Pietro, but Andreas was resposible for the specific lines that were copied.
2012-09-16 15:44:52 -04:00

27 lines
562 B
Python

"""Testing utilities."""
def _assert_less(a, b, msg=None):
message = "%r is not lower than %r" % (a, b)
if msg is not None:
message += ": " + msg
assert a < b, message
def _assert_greater(a, b, msg=None):
message = "%r is not greater than %r" % (a, b)
if msg is not None:
message += ": " + msg
assert a > b, message
try:
from nose.tools import assert_less
except ImportError:
assert_less = _assert_less
try:
from nose.tools import assert_greater
except ImportError:
assert_greater = _assert_greater