annotate tests/test-copy.py @ 70:bdc1650f216c

tests: set HGRCPATH so local hgrc's aren't loaded
author Idan Kamara <idankk86@gmail.com>
date Fri, 09 Sep 2011 23:05:57 +0300
parents f6e1d9a6e0cd
children 4359cabcb0cc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
29
c072f525ea3e client: add copy command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
1 import common
c072f525ea3e client: add copy command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
2 import hglib
c072f525ea3e client: add copy command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
3
c072f525ea3e client: add copy command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
4 class test_copy(common.basetest):
c072f525ea3e client: add copy command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
5 def test_basic(self):
c072f525ea3e client: add copy command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
6 self.append('a', 'a')
c072f525ea3e client: add copy command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
7 self.client.commit('first', addremove=True)
c072f525ea3e client: add copy command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
8
c072f525ea3e client: add copy command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
9 self.assertTrue(self.client.copy('a', 'b'))
34
f6e1d9a6e0cd client: change return value of status() to a list of (code, file path)
Idan Kamara <idankk86@gmail.com>
parents: 29
diff changeset
10 self.assertEquals(self.client.status(), [('A', 'b')])
29
c072f525ea3e client: add copy command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
11 self.append('c', 'a')
c072f525ea3e client: add copy command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
12 self.assertTrue(self.client.copy('a', 'c', after=True))
34
f6e1d9a6e0cd client: change return value of status() to a list of (code, file path)
Idan Kamara <idankk86@gmail.com>
parents: 29
diff changeset
13 self.assertEquals(self.client.status(), [('A', 'b'), ('A', 'c')])
29
c072f525ea3e client: add copy command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
14
c072f525ea3e client: add copy command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
15 # hg returns 0 even if there were warnings
c072f525ea3e client: add copy command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
16 #def test_warnings(self):
c072f525ea3e client: add copy command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
17 # self.append('a', 'a')
c072f525ea3e client: add copy command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
18 # self.client.commit('first', addremove=True)
c072f525ea3e client: add copy command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
19
c072f525ea3e client: add copy command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
20 # self.assertTrue(self.client.copy('a', 'b'))
c072f525ea3e client: add copy command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
21 # self.assertFalse(self.client.copy('a', 'b'))