def assert_eq_w_tol(self, first, second, tolerance):
        difference = abs(first - second)
        if difference <= tolerance:
            return
        msg = '%r != %r within %r delta (%r difference)' \
              % (first, second, tolerance, difference)
        raise AssertionError(msg)

    # ============================
    # tests for system-related API
    # ============================
dataset/ETHPy150Open packages/psutil/test/test_psutil.py/TestCase.assert_eq_w_tol/original