[PATCH hglib] tests: fix tests that use integer bookmarks

Durham Goode durham at fb.com
Fri Feb 8 05:56:08 CST 2013


# HG changeset patch
# User Durham Goode <durham at fb.com>
# Date 1360324302 28800
# Node ID 02dd78c2b8d74dc8a97d1aa17238cebf37ccd708
# Parent  7ce1c3b93414e08a9be1d83f17e7d87d2a24ab3b
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.

diff --git a/tests/test-bookmarks.py b/tests/test-bookmarks.py
--- a/tests/test-bookmarks.py
+++ b/tests/test-bookmarks.py
@@ -10,14 +10,14 @@
         self.append('a', 'a')
         rev1, node1 = self.client.commit('second')
 
-        self.client.bookmark('0', rev0)
+        self.client.bookmark('zero', rev0)
         self.assertEquals(self.client.bookmarks(),
-                          ([('0', rev0, node0[:12])], -1))
+                          ([('zero', rev0, node0[:12])], -1))
 
-        self.client.bookmark('1', rev1)
+        self.client.bookmark('one', rev1)
         self.assertEquals(self.client.bookmarks(),
-                          ([('0', rev0, node0[:12]),
-                            ('1', rev1, node1[:12])], 1))
+                          ([('one', rev1, node1[:12]),
+                            ('zero', rev0, node0[:12])], 0))
 
     #def test_spaces(self):
     #    self.client.bookmark('s pace', self.rev0)


More information about the Mercurial-devel mailing list