Mercurial > python-hglib
annotate tests/test-pull.py @ 147:98829bf71f10
util: define BytesIO in one place
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Fri, 13 Mar 2015 12:28:06 -0500 |
parents | 4359cabcb0cc |
children | c1b966866ed7 |
rev | line source |
---|---|
40 | 1 import common, hglib |
143
4359cabcb0cc
hglib: move string literals in the test code to util.b() (issue4520)
Brett Cannon <brett@python.org>
parents:
40
diff
changeset
|
2 from hglib.util import b |
40 | 3 |
4 class test_pull(common.basetest): | |
5 def test_basic(self): | |
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:
40
diff
changeset
|
7 self.client.commit(b('first'), addremove=True) |
40 | 8 |
143
4359cabcb0cc
hglib: move string literals in the test code to util.b() (issue4520)
Brett Cannon <brett@python.org>
parents:
40
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:
40
diff
changeset
|
10 other = hglib.open(b('other')) |
40 | 11 |
12 self.append('a', 'a') | |
143
4359cabcb0cc
hglib: move string literals in the test code to util.b() (issue4520)
Brett Cannon <brett@python.org>
parents:
40
diff
changeset
|
13 self.client.commit(b('second')) |
40 | 14 |
15 self.assertTrue(other.pull()) | |
16 self.assertEquals(self.client.log(), other.log()) | |
17 | |
18 def test_unresolved(self): | |
19 self.append('a', 'a') | |
143
4359cabcb0cc
hglib: move string literals in the test code to util.b() (issue4520)
Brett Cannon <brett@python.org>
parents:
40
diff
changeset
|
20 self.client.commit(b('first'), addremove=True) |
40 | 21 |
143
4359cabcb0cc
hglib: move string literals in the test code to util.b() (issue4520)
Brett Cannon <brett@python.org>
parents:
40
diff
changeset
|
22 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:
40
diff
changeset
|
23 other = hglib.open(b('other')) |
40 | 24 |
25 self.append('a', 'a') | |
143
4359cabcb0cc
hglib: move string literals in the test code to util.b() (issue4520)
Brett Cannon <brett@python.org>
parents:
40
diff
changeset
|
26 self.client.commit(b('second')) |
40 | 27 |
28 self.append('other/a', 'b') | |
29 self.assertFalse(other.pull(update=True)) | |
143
4359cabcb0cc
hglib: move string literals in the test code to util.b() (issue4520)
Brett Cannon <brett@python.org>
parents:
40
diff
changeset
|
30 self.assertTrue((b('M'), b('a')) in other.status()) |