Mercurial > python-hglib
annotate tests/test_resolve.py @ 219:8341f2494b3f
hglib tests: migrate away from (unmaintained) nose
author | Mathias De Mare <mathias.de_mare@nokia.com> |
---|---|
date | Wed, 08 Mar 2023 17:04:58 +0100 |
parents | tests/test-resolve.py@c1b966866ed7 |
children | a2afbf236ca8 |
rev | line source |
---|---|
148
c1b966866ed7
hglib: make all imports absolute (issue4520)
Brett Cannon <brett@python.org>
parents:
143
diff
changeset
|
1 from tests import common |
c1b966866ed7
hglib: make all imports absolute (issue4520)
Brett Cannon <brett@python.org>
parents:
143
diff
changeset
|
2 import hglib |
143
4359cabcb0cc
hglib: move string literals in the test code to util.b() (issue4520)
Brett Cannon <brett@python.org>
parents:
134
diff
changeset
|
3 from hglib.util import b |
63 | 4 |
5 class test_resolve(common.basetest): | |
6 def setUp(self): | |
7 common.basetest.setUp(self) | |
8 | |
9 self.append('a', 'a') | |
10 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
|
11 rev, self.node0 = self.client.commit(b('first'), addremove=True) |
63 | 12 |
13 self.append('a', 'a') | |
14 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
|
15 rev, self.node1 = self.client.commit(b('second')) |
63 | 16 |
17 def test_basic(self): | |
18 self.client.update(self.node0) | |
19 self.append('a', 'b') | |
20 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
|
21 rev, self.node3 = self.client.commit(b('third')) |
63 | 22 |
134 | 23 self.assertRaises(hglib.error.CommandError, self.client.merge, |
24 self.node1) | |
25 self.assertRaises(hglib.error.CommandError, | |
26 self.client.resolve, all=True) | |
63 | 27 |
143
4359cabcb0cc
hglib: move string literals in the test code to util.b() (issue4520)
Brett Cannon <brett@python.org>
parents:
134
diff
changeset
|
28 self.assertEquals([(b('U'), b('a')), (b('U'), b('b'))], |
63 | 29 self.client.resolve(listfiles=True)) |
30 | |
143
4359cabcb0cc
hglib: move string literals in the test code to util.b() (issue4520)
Brett Cannon <brett@python.org>
parents:
134
diff
changeset
|
31 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
|
32 self.assertEquals([(b('R'), b('a')), (b('U'), b('b'))], |
63 | 33 self.client.resolve(listfiles=True)) |