Home | History | Annotate | Download | only in python2.7

Lines Matching refs:diff

1572     # Should we do a fancy diff?
1574 # Not unless they asked for a fancy diff.
1580 # If expected output uses ellipsis, a meaningful fancy diff is
1582 # a diff was a major help anyway, so this is commented out.
1584 # and could be the basis for a kick-ass diff in this case.
1593 # The other diff types need at least a few lines to be helpful.
1609 # Check if we should use diff.
1616 diff = difflib.unified_diff(want_lines, got_lines, n=2)
1617 diff = list(diff)[2:] # strip the diff header
1618 kind = 'unified diff with -expected +actual'
1620 diff = difflib.context_diff(want_lines, got_lines, n=2)
1621 diff = list(diff)[2:] # strip the diff header
1622 kind = 'context diff with expected followed by actual'
1625 diff = list(engine.compare(want_lines, got_lines))
1628 assert 0, 'Bad diff option'
1629 diff output.
1630 diff = [line.rstrip() + '\n' for line in diff]
1631 return 'Differences (%s):\n' % kind + _indent(''.join(diff))
1633 # If we're not using diff, then simply list the expected