Mercurial > public > mercurial-scm > python-hglib
comparison tests/test-copy.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 | f6e1d9a6e0cd |
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_copy(common.basetest): | 5 class test_copy(common.basetest): |
5 def test_basic(self): | 6 def test_basic(self): |
6 self.append('a', 'a') | 7 self.append('a', 'a') |
7 self.client.commit('first', addremove=True) | 8 self.client.commit(b('first'), addremove=True) |
8 | 9 |
9 self.assertTrue(self.client.copy('a', 'b')) | 10 self.assertTrue(self.client.copy(b('a'), b('b'))) |
10 self.assertEquals(self.client.status(), [('A', 'b')]) | 11 self.assertEquals(self.client.status(), [(b('A'), b('b'))]) |
11 self.append('c', 'a') | 12 self.append('c', 'a') |
12 self.assertTrue(self.client.copy('a', 'c', after=True)) | 13 self.assertTrue(self.client.copy(b('a'), b('c'), after=True)) |
13 self.assertEquals(self.client.status(), [('A', 'b'), ('A', 'c')]) | 14 self.assertEquals(self.client.status(), |
15 [(b('A'), b('b')), (b('A'), b('c'))]) | |
14 | 16 |
15 # hg returns 0 even if there were warnings | 17 # hg returns 0 even if there were warnings |
16 #def test_warnings(self): | 18 #def test_warnings(self): |
17 # self.append('a', 'a') | 19 # self.append('a', 'a') |
18 # self.client.commit('first', addremove=True) | 20 # self.client.commit('first', addremove=True) |