예제 #1
0
    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)
예제 #2
0
    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)
예제 #3
0
 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)
예제 #4
0
 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)
예제 #5
0
 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)