Mercurial > public > mercurial-scm > python-hglib
view tests/test-heads.py @ 101:d1a42c1d0b61
tests: hook into hgclient.open for closing open cmdservers
So we ensure proper cleanup and cover all top level functions.
author | Idan Kamara <idankk86@gmail.com> |
---|---|
date | Wed, 18 Jan 2012 00:39:24 +0200 |
parents | 2657fd6fef04 |
children | 4359cabcb0cc |
line wrap: on
line source
import common class test_heads(common.basetest): def test_empty(self): self.assertEquals(self.client.heads(), []) def test_basic(self): self.append('a', 'a') rev, node0 = self.client.commit('first', addremove=True) self.assertEquals(self.client.heads(), [self.client.tip()]) self.client.branch('foo') self.append('a', 'a') rev, node1 = self.client.commit('second') self.assertEquals(self.client.heads(node0, topological=True), [])