comparison tests/test_paths.py @ 219:8341f2494b3f

hglib tests: migrate away from (unmaintained) nose
author Mathias De Mare <mathias.de_mare@nokia.com>
date Wed, 08 Mar 2023 17:04:58 +0100
parents tests/test-paths.py@c1b966866ed7
children a2afbf236ca8
comparison
equal deleted inserted replaced
218:934608d4fcba 219:8341f2494b3f
1 import os
2 from tests import common
3 import hglib
4 from hglib.util import b
5
6 class test_paths(common.basetest):
7 def test_basic(self):
8 f = open('.hg/hgrc', 'a')
9 f.write('[paths]\nfoo = bar\n')
10 f.close()
11
12 # hgrc isn't watched for changes yet, have to reopen
13 self.client = hglib.open()
14 paths = self.client.paths()
15 self.assertEquals(len(paths), 1)
16 self.assertEquals(paths[b('foo')],
17 os.path.abspath('bar').encode('latin-1'))
18 self.assertEquals(self.client.paths(b('foo')),
19 os.path.abspath('bar').encode('latin-1'))