def testUnifiedDiff(self): """Test text diff output with different value""" a = A() b = B() expected = """--- None +++ None @@ -1,1 +1,1 @@ -कामसूत्र +過労死""" fd = TextDiff(a, b, "attribute") self.assertEqual(fd.unified_diff(), expected)
def testUnifiedDiff(self): """Test text diff output with different value""" a = A() b = B() expected = """--- version1 +++ version2 @@ -1 +1 @@ -कामसूत्र +過労死""" fd = TextDiff(a, b, 'attribute', 'version1', 'version2') self.assertEqual(fd.unified_diff(), expected)
def testUnifiedDiff(self): """Test text diff output with different value""" a = A() b = B() if sys.version_info[:2] >= (2, 7): expected = """--- None +++ None @@ -1 +1 @@ -कामसूत्र +過労死""" else: expected = """--- None +++ None @@ -1,1 +1,1 @@ -कामसूत्र +過労死""" fd = TextDiff(a, b, 'attribute') self.assertEqual(fd.unified_diff(), expected)