annotate tests/test-paths.py @ 50:bd7dfd94b0d9

client: use util.reterrorhandler
author Idan Kamara <idankk86@gmail.com>
date Thu, 18 Aug 2011 16:20:23 +0300
parents eac8be119d81
children e738d6fe5f3f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
eac8be119d81 tests: rearrange tests and use nosetests
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
1 import common, os
eac8be119d81 tests: rearrange tests and use nosetests
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
2 import hglib
eac8be119d81 tests: rearrange tests and use nosetests
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
3
eac8be119d81 tests: rearrange tests and use nosetests
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
4 class test_paths(common.basetest):
eac8be119d81 tests: rearrange tests and use nosetests
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
5 def test_basic(self):
eac8be119d81 tests: rearrange tests and use nosetests
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
6 open('.hg/hgrc', 'a').write('[paths]\nfoo = bar\n')
eac8be119d81 tests: rearrange tests and use nosetests
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
7
eac8be119d81 tests: rearrange tests and use nosetests
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
8 # hgrc isn't watched for changes yet, have to reopen
eac8be119d81 tests: rearrange tests and use nosetests
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
9 self.client = hglib.open()
eac8be119d81 tests: rearrange tests and use nosetests
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
10 paths = self.client.paths()
eac8be119d81 tests: rearrange tests and use nosetests
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
11 self.assertEquals(len(paths), 1)
eac8be119d81 tests: rearrange tests and use nosetests
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
12 self.assertEquals(paths['foo'], os.path.abspath('bar'))
eac8be119d81 tests: rearrange tests and use nosetests
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
13 self.assertEquals(self.client.paths('foo'), os.path.abspath('bar'))