Show More
@@ -4,7 +4,7 b' import unittest' | |||||
4 | from mercurial import error, mdiff |
|
4 | from mercurial import error, mdiff | |
5 |
|
5 | |||
6 | # for readability, line numbers are 0-origin |
|
6 | # for readability, line numbers are 0-origin | |
7 | text1 = ''' |
|
7 | text1 = b''' | |
8 | 00 at OLD |
|
8 | 00 at OLD | |
9 | 01 at OLD |
|
9 | 01 at OLD | |
10 | 02 at OLD |
|
10 | 02 at OLD | |
@@ -19,7 +19,7 b' 05 at NEW, 06 at OLD' | |||||
19 | 11 at OLD |
|
19 | 11 at OLD | |
20 | '''[1:] # strip initial LF |
|
20 | '''[1:] # strip initial LF | |
21 |
|
21 | |||
22 | text2 = ''' |
|
22 | text2 = b''' | |
23 | 00 at NEW |
|
23 | 00 at NEW | |
24 | 01 at NEW |
|
24 | 01 at NEW | |
25 | 02 at NEW, 03 at OLD |
|
25 | 02 at NEW, 03 at OLD | |
@@ -47,10 +47,10 b' class blocksinrangetests(unittest.TestCa' | |||||
47 | def setUp(self): |
|
47 | def setUp(self): | |
48 | self.blocks = list(mdiff.allblocks(text1, text2)) |
|
48 | self.blocks = list(mdiff.allblocks(text1, text2)) | |
49 | assert self.blocks == [ |
|
49 | assert self.blocks == [ | |
50 | ([0, 3, 0, 2], '!'), |
|
50 | ([0, 3, 0, 2], b'!'), | |
51 | ((3, 7, 2, 6), '='), |
|
51 | ((3, 7, 2, 6), b'='), | |
52 | ([7, 12, 6, 12], '!'), |
|
52 | ([7, 12, 6, 12], b'!'), | |
53 | ((12, 12, 12, 12), '='), |
|
53 | ((12, 12, 12, 12), b'='), | |
54 | ], self.blocks |
|
54 | ], self.blocks | |
55 |
|
55 | |||
56 | def testWithinEqual(self): |
|
56 | def testWithinEqual(self): |
General Comments 0
You need to be logged in to leave comments.
Login now