annotate tests/test-init.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 |
|
children |
07efbd3bd09a |
rev |
line source |
60
|
1 import hglib, common, shutil
|
|
2
|
|
3 class test_init(common.basetest):
|
|
4 def test_exists(self):
|
|
5 self.assertRaises(hglib.error.CommandError, hglib.init)
|
|
6
|
|
7 def test_basic(self):
|
|
8 self.client.close()
|
|
9 self.client = None
|
|
10 shutil.rmtree('.hg')
|
|
11
|
|
12 self.client = hglib.init()
|
|
13 self.assertTrue(self.client.root().endswith('test_init'))
|