Mercurial > python-hglib
view tests/test-paths.py @ 60:ce516ed9bc0d
hglib: add init command
There's not much value to adding this to hgclient since that will require a
repo in the first place. Instead we're providing this as a top level function
so users don't have to create a repo by themselves.
author | Idan Kamara <idankk86@gmail.com> |
---|---|
date | Fri, 19 Aug 2011 20:15:03 +0300 |
parents | eac8be119d81 |
children | e738d6fe5f3f |
line wrap: on
line source
import common, os import hglib class test_paths(common.basetest): def test_basic(self): open('.hg/hgrc', 'a').write('[paths]\nfoo = bar\n') # hgrc isn't watched for changes yet, have to reopen self.client = hglib.open() paths = self.client.paths() self.assertEquals(len(paths), 1) self.assertEquals(paths['foo'], os.path.abspath('bar')) self.assertEquals(self.client.paths('foo'), os.path.abspath('bar'))