Mercurial > python-hglib
comparison tests/test_branches.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-branches.py@c1b966866ed7 |
children | a2afbf236ca8 |
comparison
equal
deleted
inserted
replaced
218:934608d4fcba | 219:8341f2494b3f |
---|---|
1 from tests import common | |
2 import hglib | |
3 from hglib.util import b | |
4 | |
5 class test_branches(common.basetest): | |
6 def test_empty(self): | |
7 self.assertEquals(self.client.branches(), []) | |
8 | |
9 def test_basic(self): | |
10 self.append('a', 'a') | |
11 rev0 = self.client.commit(b('first'), addremove=True) | |
12 self.client.branch(b('foo')) | |
13 self.append('a', 'a') | |
14 rev1 = self.client.commit(b('second')) | |
15 branches = self.client.branches() | |
16 | |
17 expected = [] | |
18 for r, n in (rev1, rev0): | |
19 r = self.client.log(r)[0] | |
20 expected.append((r.branch, int(r.rev), r.node[:12])) | |
21 | |
22 self.assertEquals(branches, expected) | |
23 | |
24 def test_active_closed(self): | |
25 pass |