Mercurial > python-hglib
comparison tests/test-update.py @ 34:f6e1d9a6e0cd
client: change return value of status() to a list of (code, file path)
author | Idan Kamara <idankk86@gmail.com> |
---|---|
date | Sun, 14 Aug 2011 00:51:15 +0300 |
parents | 6a9d16ddae31 |
children | a0328b08e028 |
comparison
equal
deleted
inserted
replaced
33:d74a5891d9d1 | 34:f6e1d9a6e0cd |
---|---|
22 u, m, r, ur = self.client.update() | 22 u, m, r, ur = self.client.update() |
23 self.assertEquals(u, 0) | 23 self.assertEquals(u, 0) |
24 self.assertEquals(m, 0) | 24 self.assertEquals(m, 0) |
25 self.assertEquals(r, 0) | 25 self.assertEquals(r, 0) |
26 self.assertEquals(ur, 1) | 26 self.assertEquals(ur, 1) |
27 self.assertEquals(self.client.status()['M'][0], 'a') | 27 self.assertTrue(('M', 'a') in self.client.status()) |
28 | 28 |
29 def test_merge(self): | 29 def test_merge(self): |
30 self.append('a', '\n\n\n\nb') | 30 self.append('a', '\n\n\n\nb') |
31 rev2, node2 = self.client.commit('third') | 31 rev2, node2 = self.client.commit('third') |
32 self.append('a', 'b') | 32 self.append('a', 'b') |
37 u, m, r, ur = self.client.update() | 37 u, m, r, ur = self.client.update() |
38 self.assertEquals(u, 0) | 38 self.assertEquals(u, 0) |
39 self.assertEquals(m, 1) | 39 self.assertEquals(m, 1) |
40 self.assertEquals(r, 0) | 40 self.assertEquals(r, 0) |
41 self.assertEquals(ur, 0) | 41 self.assertEquals(ur, 0) |
42 self.assertEquals(self.client.status()['M'][0], 'a') | 42 self.assertEquals(self.client.status(), [('M', 'a')]) |
43 | 43 |
44 def test_tip(self): | 44 def test_tip(self): |
45 self.client.update(self.rev0) | 45 self.client.update(self.rev0) |
46 u, m, r, ur = self.client.update() | 46 u, m, r, ur = self.client.update() |
47 self.assertEquals(u, 1) | 47 self.assertEquals(u, 1) |