comparison tests/test_manifest.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-manifest.py@c1b966866ed7
children a2afbf236ca8
comparison
equal deleted inserted replaced
218:934608d4fcba 219:8341f2494b3f
1 from tests import common
2 import hglib, os, stat
3 from hglib.util import b
4
5 class test_manifest(common.basetest):
6 def test_basic(self):
7 self.append('a', 'a')
8 files = [b('a')]
9 manifest = [(b('047b75c6d7a3ef6a2243bd0e99f94f6ea6683597'), b('644'),
10 False, False, b('a'))]
11
12 if os.name == 'posix':
13 self.append('b', 'b')
14 os.chmod('b', os.stat('b')[0] | stat.S_IEXEC)
15 os.symlink('b', 'c')
16
17 files.extend([b('b'), b('c')])
18 manifest.extend([(b('62452855512f5b81522aa3895892760bb8da9f3f'),
19 b('755'), True, False, b('b')),
20 (b('62452855512f5b81522aa3895892760bb8da9f3f'),
21 b('644'), False, True, b('c'))])
22
23 self.client.commit(b('first'), addremove=True)
24
25 self.assertEquals(list(self.client.manifest(all=True)), files)
26
27 self.assertEquals(list(self.client.manifest()), manifest)