diff tests/test-paths.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 e738d6fe5f3f
children c1b966866ed7
line wrap: on
line diff
--- a/tests/test-paths.py	Sun Mar 08 13:08:37 2015 -0400
+++ b/tests/test-paths.py	Mon Mar 09 18:26:25 2015 -0400
@@ -1,5 +1,6 @@
 import common, os
 import hglib
+from hglib.util import b
 
 class test_paths(common.basetest):
     def test_basic(self):
@@ -11,5 +12,7 @@
         self.client = hglib.open()
         paths = self.client.paths()
         self.assertEquals(len(paths), 1)
-        self.assertEquals(paths['foo'], os.path.abspath('bar'))
-        self.assertEquals(self.client.paths('foo'), os.path.abspath('bar'))
+        self.assertEquals(paths[b('foo')],
+                          os.path.abspath('bar').encode('latin-1'))
+        self.assertEquals(self.client.paths(b('foo')),
+                          os.path.abspath('bar').encode('latin-1'))