changeset 41322:4ef28d7e22ae

tests: make filenames bytes for Python 3 I also snuck a %s -> %d in there to appease Python 3. Differential Revision: https://phab.mercurial-scm.org/D5654
author Gregory Szorc <gregory.szorc@gmail.com>
date Tue, 22 Jan 2019 18:23:47 -0800
parents 724b4606528e
children abac73eedd4d
files tests/test-remotefilelog-histpack.py
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-remotefilelog-histpack.py	Tue Jan 22 18:16:53 2019 -0800
+++ b/tests/test-remotefilelog-histpack.py	Tue Jan 22 18:23:47 2019 -0800
@@ -52,7 +52,7 @@
         node, p1node, p2node, and linknode.
         """
         if revisions is None:
-            revisions = [("filename", self.getFakeHash(), nullid, nullid,
+            revisions = [(b"filename", self.getFakeHash(), nullid, nullid,
                           self.getFakeHash(), None)]
 
         packdir = pycompat.fsencode(self.makeTempDir())
@@ -68,7 +68,7 @@
     def testAddSingle(self):
         """Test putting a single entry into a pack and reading it out.
         """
-        filename = "foo"
+        filename = b"foo"
         node = self.getFakeHash()
         p1 = self.getFakeHash()
         p2 = self.getFakeHash()
@@ -88,7 +88,7 @@
         """
         revisions = []
         for i in range(10):
-            filename = "foo-%s" % i
+            filename = b"foo-%d" % i
             node = self.getFakeHash()
             p1 = self.getFakeHash()
             p2 = self.getFakeHash()
@@ -218,8 +218,8 @@
         self.assertEqual(missing, [(filename, fakenode)])
 
         # Test getmissing on a non-existant filename
-        missing = pack.getmissing([("bar", fakenode)])
-        self.assertEqual(missing, [("bar", fakenode)])
+        missing = pack.getmissing([(b"bar", fakenode)])
+        self.assertEqual(missing, [(b"bar", fakenode)])
 
     def testAddThrows(self):
         pack = self.createPack()