annotate tests/test-manifest.py @ 144:3c59643a2bc3

test-commit: drop print statements
author Matt Mackall <mpm@selenic.com>
date Wed, 11 Mar 2015 14:53:36 -0500
parents 4359cabcb0cc
children c1b966866ed7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
64
a7d98dc798c5 client: add manifest command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
1 import common, hglib, os, stat
143
4359cabcb0cc hglib: move string literals in the test code to util.b() (issue4520)
Brett Cannon <brett@python.org>
parents: 69
diff changeset
2 from hglib.util import b
64
a7d98dc798c5 client: add manifest command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
3
a7d98dc798c5 client: add manifest command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
4 class test_manifest(common.basetest):
a7d98dc798c5 client: add manifest command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
5 def test_basic(self):
a7d98dc798c5 client: add manifest command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
6 self.append('a', 'a')
143
4359cabcb0cc hglib: move string literals in the test code to util.b() (issue4520)
Brett Cannon <brett@python.org>
parents: 69
diff changeset
7 files = [b('a')]
4359cabcb0cc hglib: move string literals in the test code to util.b() (issue4520)
Brett Cannon <brett@python.org>
parents: 69
diff changeset
8 manifest = [(b('047b75c6d7a3ef6a2243bd0e99f94f6ea6683597'), b('644'),
4359cabcb0cc hglib: move string literals in the test code to util.b() (issue4520)
Brett Cannon <brett@python.org>
parents: 69
diff changeset
9 False, False, b('a'))]
69
e89dd99638ce test-manifest: Windows doesn't have symlink or executable bit
Idan Kamara <idankk86@gmail.com>
parents: 64
diff changeset
10
e89dd99638ce test-manifest: Windows doesn't have symlink or executable bit
Idan Kamara <idankk86@gmail.com>
parents: 64
diff changeset
11 if os.name == 'posix':
e89dd99638ce test-manifest: Windows doesn't have symlink or executable bit
Idan Kamara <idankk86@gmail.com>
parents: 64
diff changeset
12 self.append('b', 'b')
e89dd99638ce test-manifest: Windows doesn't have symlink or executable bit
Idan Kamara <idankk86@gmail.com>
parents: 64
diff changeset
13 os.chmod('b', os.stat('b')[0] | stat.S_IEXEC)
e89dd99638ce test-manifest: Windows doesn't have symlink or executable bit
Idan Kamara <idankk86@gmail.com>
parents: 64
diff changeset
14 os.symlink('b', 'c')
e89dd99638ce test-manifest: Windows doesn't have symlink or executable bit
Idan Kamara <idankk86@gmail.com>
parents: 64
diff changeset
15
143
4359cabcb0cc hglib: move string literals in the test code to util.b() (issue4520)
Brett Cannon <brett@python.org>
parents: 69
diff changeset
16 files.extend([b('b'), b('c')])
4359cabcb0cc hglib: move string literals in the test code to util.b() (issue4520)
Brett Cannon <brett@python.org>
parents: 69
diff changeset
17 manifest.extend([(b('62452855512f5b81522aa3895892760bb8da9f3f'),
4359cabcb0cc hglib: move string literals in the test code to util.b() (issue4520)
Brett Cannon <brett@python.org>
parents: 69
diff changeset
18 b('755'), True, False, b('b')),
4359cabcb0cc hglib: move string literals in the test code to util.b() (issue4520)
Brett Cannon <brett@python.org>
parents: 69
diff changeset
19 (b('62452855512f5b81522aa3895892760bb8da9f3f'),
4359cabcb0cc hglib: move string literals in the test code to util.b() (issue4520)
Brett Cannon <brett@python.org>
parents: 69
diff changeset
20 b('644'), False, True, b('c'))])
69
e89dd99638ce test-manifest: Windows doesn't have symlink or executable bit
Idan Kamara <idankk86@gmail.com>
parents: 64
diff changeset
21
143
4359cabcb0cc hglib: move string literals in the test code to util.b() (issue4520)
Brett Cannon <brett@python.org>
parents: 69
diff changeset
22 self.client.commit(b('first'), addremove=True)
64
a7d98dc798c5 client: add manifest command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
23
69
e89dd99638ce test-manifest: Windows doesn't have symlink or executable bit
Idan Kamara <idankk86@gmail.com>
parents: 64
diff changeset
24 self.assertEquals(list(self.client.manifest(all=True)), files)
64
a7d98dc798c5 client: add manifest command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
25
a7d98dc798c5 client: add manifest command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
26 self.assertEquals(list(self.client.manifest()), manifest)