Mercurial > python-hglib
view tests/test-bookmarks.py @ 117:59cb26bf866e
error: show more info on CommandError's __str__
Sometimes stderr doesn't contain anything which makes the current
__str__ useless. We now return a tuple of (exit code, output, error).
author | Idan Kamara <idankk86@gmail.com> |
---|---|
date | Fri, 14 Jun 2013 18:36:56 +0300 |
parents | 2e2055fc66c3 |
children | 4359cabcb0cc |
line wrap: on
line source
import common class test_bookmarks(common.basetest): def test_empty(self): self.assertEquals(self.client.bookmarks(), ([], -1)) def test_basic(self): self.append('a', 'a') rev0, node0 = self.client.commit('first', addremove=True) self.append('a', 'a') rev1, node1 = self.client.commit('second') self.client.bookmark('zero', rev0) self.assertEquals(self.client.bookmarks(), ([('zero', rev0, node0[:12])], -1)) self.client.bookmark('one', rev1) self.assertEquals(self.client.bookmarks()[0], [('one', rev1, node1[:12]), ('zero', rev0, node0[:12])]) #def test_spaces(self): # self.client.bookmark('s pace', self.rev0) # self.assertEquals(self.client.bookmarks(), # ([('s pace', 0, self.rev0.node[:12])], -1))