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