@@ -0,0 +1,1254 @@
+r'''Collection of utilities for testing%0A%0A    Currently, this consists of unit-aware test functions%0A'''%0A%0Aimport numpy.testing%0Afrom pint import DimensionalityError%0Afrom .units import units%0A%0A%0Adef check_and_drop_units(actual, desired):%0A    try:%0A        if not hasattr(desired, 'units'):%0A            actual = actual.to('dimensionless')%0A        elif not hasattr(actual, 'units'):%0A            actual = units.Quantity(actual, 'dimensionless')%0A        else:%0A            actual = actual.to(desired.units)%0A    except DimensionalityError:%0A        raise AssertionError('Units are not compatible: %25s should be %25s' %25%0A                             (actual.units, desired.units))%0A    except AttributeError:%0A        pass%0A%0A    if hasattr(actual, 'magnitude'):%0A        actual = actual.magnitude%0A    if hasattr(desired, 'magnitude'):%0A        desired = desired.magnitude%0A%0A    return actual, desired%0A%0A%0Adef assert_almost_equal(actual, desired, decimal=7):%0A        actual, desired = check_and_drop_units(actual, desired)%0A        numpy.testing.assert_almost_equal(actual, desired, decimal)%0A%0A%0Adef assert_array_almost_equal(actual, desired, decimal=7):%0A    actual, desired = check_and_drop_units(actual, desired)%0A    numpy.testing.assert_array_almost_equal(actual, desired, decimal)%0A

Add testing module.