Mercurial > python-hglib
comparison tests/test-tags.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 | 77ebb51f5f36 |
children | c1b966866ed7 |
comparison
equal
deleted
inserted
replaced
142:fe74d5599539 | 143:4359cabcb0cc |
---|---|
1 import common | 1 import common |
2 import hglib | 2 import hglib |
3 from hglib.util import b | |
3 | 4 |
4 class test_tags(common.basetest): | 5 class test_tags(common.basetest): |
5 def test_basic(self): | 6 def test_basic(self): |
6 self.append('a', 'a') | 7 self.append('a', 'a') |
7 rev, node = self.client.commit('first', addremove=True) | 8 rev, node = self.client.commit(b('first'), addremove=True) |
8 self.client.tag('my tag') | 9 self.client.tag(b('my tag')) |
9 self.client.tag('local tag', rev=rev, local=True) | 10 self.client.tag(b('local tag'), rev=rev, local=True) |
10 | 11 |
11 # filecache that was introduced in 2.0 makes us see the local tag, for | 12 # filecache that was introduced in 2.0 makes us see the local tag, for |
12 # now we have to reconnect | 13 # now we have to reconnect |
13 if self.client.version < (2, 0, 0): | 14 if self.client.version < (2, 0, 0): |
14 self.client = hglib.open() | 15 self.client = hglib.open() |
15 | 16 |
16 tags = self.client.tags() | 17 tags = self.client.tags() |
17 self.assertEquals(tags, [('tip', 1, self.client.tip().node[:12], False), | 18 self.assertEquals(tags, |
18 ('my tag', 0, node[:12], False), | 19 [(b('tip'), 1, self.client.tip().node[:12], False), |
19 ('local tag', 0, node[:12], True)]) | 20 (b('my tag'), 0, node[:12], False), |
21 (b('local tag'), 0, node[:12], True)]) |