Patchwork D2508: py3: add b'' prefixes in tests/test-revlog.t

login
register
mail settings
Submitter phabricator
Date Feb. 28, 2018, 10:30 p.m.
Message ID <differential-rev-PHID-DREV-nj5rrxz2rhwsmgorpq6b-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/28506/
State Superseded
Headers show

Comments

phabricator - Feb. 28, 2018, 10:30 p.m.
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  1. skip-blame because just b'' prefixes

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  tests/test-revlog.t

CHANGE DETAILS




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

Patch

diff --git a/tests/test-revlog.t b/tests/test-revlog.t
--- a/tests/test-revlog.t
+++ b/tests/test-revlog.t
@@ -4,25 +4,25 @@ 
 Flags on revlog version 0 are rejected
 
   >>> with open('.hg/store/00changelog.i', 'wb') as fh:
-  ...     fh.write('\x00\x01\x00\x00')
+  ...     fh.write(b'\x00\x01\x00\x00')
 
   $ hg log
   abort: unknown flags (0x01) in version 0 revlog 00changelog.i!
   [255]
 
 Unknown flags on revlog version 1 are rejected
 
   >>> with open('.hg/store/00changelog.i', 'wb') as fh:
-  ...     fh.write('\x00\x04\x00\x01')
+  ...     fh.write(b'\x00\x04\x00\x01')
 
   $ hg log
   abort: unknown flags (0x04) in version 1 revlog 00changelog.i!
   [255]
 
 Unknown version is rejected
 
   >>> with open('.hg/store/00changelog.i', 'wb') as fh:
-  ...     fh.write('\x00\x00\x00\x02')
+  ...     fh.write(b'\x00\x00\x00\x02')
 
   $ hg log
   abort: unknown version (2) in revlog 00changelog.i!
@@ -34,8 +34,8 @@ 
 
   $ hg init
 
-  >>> open("a.i", "w").write(
-  ... """eJxjYGZgZIAAYQYGxhgom+k/FMx8YKx9ZUaKSOyqo4cnuKb8mbqHV5cBCVTMWb1Cwqkhe4Gsg9AD
+  >>> open("a.i", "wb").write(
+  ... b"""eJxjYGZgZIAAYQYGxhgom+k/FMx8YKx9ZUaKSOyqo4cnuKb8mbqHV5cBCVTMWb1Cwqkhe4Gsg9AD
   ... Joa3dYtcYYYBAQ8Qr4OqZAYRICPTSr5WKd/42rV36d+8/VmrNpv7NP1jQAXrQE4BqQUARngwVA=="""
   ... .decode("base64").decode("zlib"))