'Return substrings we expect to see in error messages.'

def generate_substrings(self, first, second, tol, rel, idx):

    (abs_err, rel_err) = _calc_errors(first, second)
    substrings = [('tol=%r' % tol), ('rel=%r' % rel), ('absolute    error    =    %r' % abs_err), ('relative    error    =    %r' % rel_err)]
    if (idx is not None):
        substrings.append(('differ    at    index    %d' % idx))
    return substrings
