Mercurial > python-hglib
annotate tests/test-bookmarks.py @ 107:5fe53db61aa4 0.4
tests: fix tests that use integer bookmarks
Integer bookmarks are now not allowed (since they alias with revision numbers),
so a hglib test was failing.
author | Durham Goode <durham@fb.com> |
---|---|
date | Fri, 08 Feb 2013 03:51:42 -0800 |
parents | ca0d7e212cf8 |
children | 6190432f1d39 |
rev | line source |
---|---|
24 | 1 import common |
2 | |
3 class test_bookmarks(common.basetest): | |
4 def test_empty(self): | |
5 self.assertEquals(self.client.bookmarks(), ([], -1)) | |
6 | |
7 def test_basic(self): | |
8 self.append('a', 'a') | |
9 rev0, node0 = self.client.commit('first', addremove=True) | |
10 self.append('a', 'a') | |
11 rev1, node1 = self.client.commit('second') | |
12 | |
107
5fe53db61aa4
tests: fix tests that use integer bookmarks
Durham Goode <durham@fb.com>
parents:
24
diff
changeset
|
13 self.client.bookmark('zero', rev0) |
24 | 14 self.assertEquals(self.client.bookmarks(), |
107
5fe53db61aa4
tests: fix tests that use integer bookmarks
Durham Goode <durham@fb.com>
parents:
24
diff
changeset
|
15 ([('zero', rev0, node0[:12])], -1)) |
24 | 16 |
107
5fe53db61aa4
tests: fix tests that use integer bookmarks
Durham Goode <durham@fb.com>
parents:
24
diff
changeset
|
17 self.client.bookmark('one', rev1) |
24 | 18 self.assertEquals(self.client.bookmarks(), |
107
5fe53db61aa4
tests: fix tests that use integer bookmarks
Durham Goode <durham@fb.com>
parents:
24
diff
changeset
|
19 ([('one', rev1, node1[:12]), |
5fe53db61aa4
tests: fix tests that use integer bookmarks
Durham Goode <durham@fb.com>
parents:
24
diff
changeset
|
20 ('zero', rev0, node0[:12])], 0)) |
24 | 21 |
22 #def test_spaces(self): | |
23 # self.client.bookmark('s pace', self.rev0) | |
24 # self.assertEquals(self.client.bookmarks(), | |
25 # ([('s pace', 0, self.rev0.node[:12])], -1)) |