code: def _hash_comparison(self):
          
          def hash_then_or(hash_name):
              # For now, all the decent hashes have 6-char names, so we can get
              # away with hard-coding space literals.
              return chain([hash_name], repeat('    or'))
  
          lines = []
          for hash_name, expecteds in iteritems(self.allowed):
              prefix = hash_then_or(hash_name)
              lines.extend(('        Expected %s %s' % (next(prefix), e))
                           for e in expecteds)
              lines.append('             Got        %s\n' %
                           self.gots[hash_name].hexdigest())
              prefix = '    or'
          return '\n'.join(lines)
docs: Return a comparison of actual and expected hash values.
  
          Example::
  
                 Expected sha256 abcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcde
                              or 123451234512345123451234512345123451234512345
                      Got        bcdefbcdefbcdefbcdefbcdefbcdefbcdefbcdefbcdef