def test_shows_repr_diffs(self): class AbcRepr(object): __repr__ = lambda self: 'abc' class AbcDefRepr(object): __repr__ = lambda self: 'abcdef' expected = 'Diff:\nl: abc<>\nr: abc<def>' diff_message = assertions._diff_message(AbcRepr(), AbcDefRepr()) assert_equal(expected, diff_message)
def test_shows_string_diffs(self): expected = 'Diff:\nl: abc<>\nr: abc<def>' diff_message = assertions._diff_message('abc', 'abcdef') assert_equal(expected, diff_message)
def test_shows_string_diffs(self): expected = "Diff:\nl: abc<>\nr: abc<def>" diff_message = assertions._diff_message("abc", "abcdef") assert_equal(expected, diff_message)