Mercurial > public > mercurial-scm > python-hglib
annotate tests/test-init.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 | 07efbd3bd09a |
children | 4359cabcb0cc |
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 | |
92
07efbd3bd09a
hglib: change init to not open a command server instance automatically
Idan Kamara <idankk86@gmail.com>
parents:
60
diff
changeset
|
12 self.client = hglib.init().open() |
60 | 13 self.assertTrue(self.client.root().endswith('test_init')) |