Mercurial > python-hglib
annotate tests/test-resolve.py @ 143:4359cabcb0cc
hglib: move string literals in the test code to util.b() (issue4520)
author | Brett Cannon <brett@python.org> |
---|---|
date | Mon, 09 Mar 2015 18:26:25 -0400 |
parents | 1b47146a4a2c |
children | c1b966866ed7 |
rev | line source |
---|---|
63 | 1 import common, hglib |
143
4359cabcb0cc
hglib: move string literals in the test code to util.b() (issue4520)
Brett Cannon <brett@python.org>
parents:
134
diff
changeset
|
2 from hglib.util import b |
63 | 3 |
4 class test_resolve(common.basetest): | |
5 def setUp(self): | |
6 common.basetest.setUp(self) | |
7 | |
8 self.append('a', 'a') | |
9 self.append('b', 'b') | |
143
4359cabcb0cc
hglib: move string literals in the test code to util.b() (issue4520)
Brett Cannon <brett@python.org>
parents:
134
diff
changeset
|
10 rev, self.node0 = self.client.commit(b('first'), addremove=True) |
63 | 11 |
12 self.append('a', 'a') | |
13 self.append('b', 'b') | |
143
4359cabcb0cc
hglib: move string literals in the test code to util.b() (issue4520)
Brett Cannon <brett@python.org>
parents:
134
diff
changeset
|
14 rev, self.node1 = self.client.commit(b('second')) |
63 | 15 |
16 def test_basic(self): | |
17 self.client.update(self.node0) | |
18 self.append('a', 'b') | |
19 self.append('b', 'a') | |
143
4359cabcb0cc
hglib: move string literals in the test code to util.b() (issue4520)
Brett Cannon <brett@python.org>
parents:
134
diff
changeset
|
20 rev, self.node3 = self.client.commit(b('third')) |
63 | 21 |
134 | 22 self.assertRaises(hglib.error.CommandError, self.client.merge, |
23 self.node1) | |
24 self.assertRaises(hglib.error.CommandError, | |
25 self.client.resolve, all=True) | |
63 | 26 |
143
4359cabcb0cc
hglib: move string literals in the test code to util.b() (issue4520)
Brett Cannon <brett@python.org>
parents:
134
diff
changeset
|
27 self.assertEquals([(b('U'), b('a')), (b('U'), b('b'))], |
63 | 28 self.client.resolve(listfiles=True)) |
29 | |
143
4359cabcb0cc
hglib: move string literals in the test code to util.b() (issue4520)
Brett Cannon <brett@python.org>
parents:
134
diff
changeset
|
30 self.client.resolve(b('a'), mark=True) |
4359cabcb0cc
hglib: move string literals in the test code to util.b() (issue4520)
Brett Cannon <brett@python.org>
parents:
134
diff
changeset
|
31 self.assertEquals([(b('R'), b('a')), (b('U'), b('b'))], |
63 | 32 self.client.resolve(listfiles=True)) |