annotate tests/test-push.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
39
0555d58a7313 client: add push command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
1 import common, hglib
143
4359cabcb0cc hglib: move string literals in the test code to util.b() (issue4520)
Brett Cannon <brett@python.org>
parents: 39
diff changeset
2 from hglib.util import b
39
0555d58a7313 client: add push command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
3
0555d58a7313 client: add push command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
4 class test_push(common.basetest):
0555d58a7313 client: add push command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
5 def test_basic(self):
0555d58a7313 client: add push 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: 39
diff changeset
7 self.client.commit(b('first'), addremove=True)
39
0555d58a7313 client: add push command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
8
143
4359cabcb0cc hglib: move string literals in the test code to util.b() (issue4520)
Brett Cannon <brett@python.org>
parents: 39
diff changeset
9 self.client.clone(dest=b('other'))
4359cabcb0cc hglib: move string literals in the test code to util.b() (issue4520)
Brett Cannon <brett@python.org>
parents: 39
diff changeset
10 other = hglib.open(b('other'))
39
0555d58a7313 client: add push command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
11
0555d58a7313 client: add push command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
12 # broken in hg, doesn't return 1 if nothing to push
0555d58a7313 client: add push command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
13 #self.assertFalse(self.client.push('other'))
0555d58a7313 client: add push command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
14
0555d58a7313 client: add push command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
15 self.append('a', 'a')
143
4359cabcb0cc hglib: move string literals in the test code to util.b() (issue4520)
Brett Cannon <brett@python.org>
parents: 39
diff changeset
16 self.client.commit(b('second'))
39
0555d58a7313 client: add push command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
17
143
4359cabcb0cc hglib: move string literals in the test code to util.b() (issue4520)
Brett Cannon <brett@python.org>
parents: 39
diff changeset
18 self.assertTrue(self.client.push(b('other')))
39
0555d58a7313 client: add push command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
19 self.assertEquals(self.client.log(), other.log())