diff tests/test-resolve.py @ 143:4359cabcb0cc

hglib: move string literals in the test code to util.b() (issue4520)
author Brett Cannon <brett@python.org>
date Mon, 09 Mar 2015 18:26:25 -0400
parents 1b47146a4a2c
children c1b966866ed7
line wrap: on
line diff
--- a/tests/test-resolve.py	Sun Mar 08 13:08:37 2015 -0400
+++ b/tests/test-resolve.py	Mon Mar 09 18:26:25 2015 -0400
@@ -1,4 +1,5 @@
 import common, hglib
+from hglib.util import b
 
 class test_resolve(common.basetest):
     def setUp(self):
@@ -6,26 +7,26 @@
 
         self.append('a', 'a')
         self.append('b', 'b')
-        rev, self.node0 = self.client.commit('first', addremove=True)
+        rev, self.node0 = self.client.commit(b('first'), addremove=True)
 
         self.append('a', 'a')
         self.append('b', 'b')
-        rev, self.node1 = self.client.commit('second')
+        rev, self.node1 = self.client.commit(b('second'))
 
     def test_basic(self):
         self.client.update(self.node0)
         self.append('a', 'b')
         self.append('b', 'a')
-        rev, self.node3 = self.client.commit('third')
+        rev, self.node3 = self.client.commit(b('third'))
 
         self.assertRaises(hglib.error.CommandError, self.client.merge,
                           self.node1)
         self.assertRaises(hglib.error.CommandError,
                           self.client.resolve, all=True)
 
-        self.assertEquals([('U', 'a'), ('U', 'b')],
+        self.assertEquals([(b('U'), b('a')), (b('U'), b('b'))],
                           self.client.resolve(listfiles=True))
 
-        self.client.resolve('a', mark=True)
-        self.assertEquals([('R', 'a'), ('U', 'b')],
+        self.client.resolve(b('a'), mark=True)
+        self.assertEquals([(b('R'), b('a')), (b('U'), b('b'))],
                           self.client.resolve(listfiles=True))