Mercurial > python-hglib
comparison tests/test-copy.py @ 29:c072f525ea3e
client: add copy command
author | Idan Kamara <idankk86@gmail.com> |
---|---|
date | Sun, 14 Aug 2011 00:48:40 +0300 |
parents | |
children | f6e1d9a6e0cd |
comparison
equal
deleted
inserted
replaced
28:221eeb3693f4 | 29:c072f525ea3e |
---|---|
1 import common | |
2 import hglib | |
3 | |
4 class test_copy(common.basetest): | |
5 def test_basic(self): | |
6 self.append('a', 'a') | |
7 self.client.commit('first', addremove=True) | |
8 | |
9 self.assertTrue(self.client.copy('a', 'b')) | |
10 self.assertEquals(self.client.status()['A'], ['b']) | |
11 self.append('c', 'a') | |
12 self.assertTrue(self.client.copy('a', 'c', after=True)) | |
13 self.assertEquals(self.client.status()['A'], ['b', 'c']) | |
14 | |
15 # hg returns 0 even if there were warnings | |
16 #def test_warnings(self): | |
17 # self.append('a', 'a') | |
18 # self.client.commit('first', addremove=True) | |
19 | |
20 # self.assertTrue(self.client.copy('a', 'b')) | |
21 # self.assertFalse(self.client.copy('a', 'b')) |