|
@@ -49,9 +49,7 @@ class TestPatchStream(unittest.TestCase):
|
49
|
49
|
|
50
|
50
|
def test_read_stream_header(self):
|
51
|
51
|
stream = cdiff.PatchStream(Sequential([]))
|
52
|
|
- self.assertEqual(
|
53
|
|
- stream.read_stream_header(1),
|
54
|
|
- [])
|
|
52
|
+ self.assertEqual(stream.read_stream_header(1), [])
|
55
|
53
|
|
56
|
54
|
items = ['hello', 'world', 'again']
|
57
|
55
|
|
|
@@ -79,18 +77,14 @@ class TestHunk(unittest.TestCase):
|
79
|
77
|
hunk.append(('-', 'foo\n'))
|
80
|
78
|
hunk.append(('+', 'bar\n'))
|
81
|
79
|
hunk.append((' ', 'common\n'))
|
82
|
|
- self.assertEqual(
|
83
|
|
- hunk._get_old_text(),
|
84
|
|
- ['foo\n', 'common\n'])
|
|
80
|
+ self.assertEqual(hunk._get_old_text(), ['foo\n', 'common\n'])
|
85
|
81
|
|
86
|
82
|
def test_get_new_text(self):
|
87
|
83
|
hunk = cdiff.Hunk([], '@@ -1,2 +1,2 @@', (1,2), (1,2))
|
88
|
84
|
hunk.append(('-', 'foo\n'))
|
89
|
85
|
hunk.append(('+', 'bar\n'))
|
90
|
86
|
hunk.append((' ', 'common\n'))
|
91
|
|
- self.assertEqual(
|
92
|
|
- hunk._get_new_text(),
|
93
|
|
- ['bar\n', 'common\n'])
|
|
87
|
+ self.assertEqual(hunk._get_new_text(), ['bar\n', 'common\n'])
|
94
|
88
|
|
95
|
89
|
|
96
|
90
|
class TestDiff(unittest.TestCase):
|