Patchwork D5654: tests: make filenames bytes for Python 3

login
register
mail settings
Submitter phabricator
Date Jan. 23, 2019, 5:50 a.m.
Message ID <33be84e877bf7851b1cfa437a93daf05@localhost.localdomain>
Download mbox | patch
Permalink /patch/37927/
State Not Applicable
Headers show

Comments

phabricator - Jan. 23, 2019, 5:50 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG4ef28d7e22ae: tests: make filenames bytes for Python 3 (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5654?vs=13350&id=13366

REVISION DETAIL
  https://phab.mercurial-scm.org/D5654

AFFECTED FILES
  tests/test-remotefilelog-histpack.py

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/tests/test-remotefilelog-histpack.py b/tests/test-remotefilelog-histpack.py
--- a/tests/test-remotefilelog-histpack.py
+++ b/tests/test-remotefilelog-histpack.py
@@ -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()