Mercurial > python-hglib
comparison tests/test-summary.py @ 165:dbb21a4c0eb9 1.8
tests: fix test-summary for python3
We get back bytes, not str. Sorry about that.
author | Julien Cristau <julien.cristau@logilab.fr> |
---|---|
date | Tue, 01 Sep 2015 10:07:43 +0200 |
parents | 568bca4ff58e |
children | 9062a6b935ad |
comparison
equal
deleted
inserted
replaced
164:568bca4ff58e | 165:dbb21a4c0eb9 |
---|---|
18 d = {b('parent') : [(0, node[:12], b('tip'), b('first'))], | 18 d = {b('parent') : [(0, node[:12], b('tip'), b('first'))], |
19 b('branch') : b('default'), | 19 b('branch') : b('default'), |
20 b('commit') : True, | 20 b('commit') : True, |
21 b('update') : 0} | 21 b('update') : 0} |
22 if self.client.version >= (3, 5): | 22 if self.client.version >= (3, 5): |
23 d[b('phases')] = '1 draft' | 23 d[b('phases')] = b('1 draft') |
24 | 24 |
25 self.assertEquals(self.client.summary(), d) | 25 self.assertEquals(self.client.summary(), d) |
26 | 26 |
27 def test_commit_dirty(self): | 27 def test_commit_dirty(self): |
28 self.append('a', 'a') | 28 self.append('a', 'a') |
32 d = {b('parent') : [(0, node[:12], b('tip'), b('first'))], | 32 d = {b('parent') : [(0, node[:12], b('tip'), b('first'))], |
33 b('branch') : b('default'), | 33 b('branch') : b('default'), |
34 b('commit') : False, | 34 b('commit') : False, |
35 b('update') : 0} | 35 b('update') : 0} |
36 if self.client.version >= (3, 5): | 36 if self.client.version >= (3, 5): |
37 d[b('phases')] = '1 draft' | 37 d[b('phases')] = b('1 draft') |
38 | 38 |
39 self.assertEquals(self.client.summary(), d) | 39 self.assertEquals(self.client.summary(), d) |
40 | 40 |
41 def test_update(self): | 41 def test_update(self): |
42 self.append('a', 'a') | 42 self.append('a', 'a') |
48 d = {b('parent') : [(0, node[:12], None, b('first'))], | 48 d = {b('parent') : [(0, node[:12], None, b('first'))], |
49 b('branch') : b('default'), | 49 b('branch') : b('default'), |
50 b('commit') : True, | 50 b('commit') : True, |
51 b('update') : 1} | 51 b('update') : 1} |
52 if self.client.version >= (3, 5): | 52 if self.client.version >= (3, 5): |
53 d[b('phases')] = '2 draft' | 53 d[b('phases')] = b('2 draft') |
54 | 54 |
55 self.assertEquals(self.client.summary(), d) | 55 self.assertEquals(self.client.summary(), d) |
56 | 56 |
57 def test_remote(self): | 57 def test_remote(self): |
58 self.append('a', 'a') | 58 self.append('a', 'a') |
95 tags = b('tip bmother') | 95 tags = b('tip bmother') |
96 else: | 96 else: |
97 tags = b('tip') | 97 tags = b('tip') |
98 d[b('parent')] = [(1, node[:12], tags, b('second in other'))] | 98 d[b('parent')] = [(1, node[:12], tags, b('second in other'))] |
99 if self.client.version >= (3, 5): | 99 if self.client.version >= (3, 5): |
100 d[b('phases')] = '1 draft' | 100 d[b('phases')] = b('1 draft') |
101 | 101 |
102 self.assertEquals(other.summary(remote=True), d) | 102 self.assertEquals(other.summary(remote=True), d) |
103 | 103 |
104 def test_two_parents(self): | 104 def test_two_parents(self): |
105 self.append('a', 'a') | 105 self.append('a', 'a') |
118 (1, node1[:12], None, b('second'))], | 118 (1, node1[:12], None, b('second'))], |
119 b('branch') : b('default'), | 119 b('branch') : b('default'), |
120 b('commit') : False, | 120 b('commit') : False, |
121 b('update') : 0} | 121 b('update') : 0} |
122 if self.client.version >= (3, 5): | 122 if self.client.version >= (3, 5): |
123 d[b('phases')] = '3 draft' | 123 d[b('phases')] = b('3 draft') |
124 | 124 |
125 self.assertEquals(self.client.summary(), d) | 125 self.assertEquals(self.client.summary(), d) |