py3: add b'' prefixes in tests/test-revlog.t
authorPulkit Goyal <7895pulkit@gmail.com>
Wed, 28 Feb 2018 22:10:59 +0530
changeset 36514 71d1bbf1617e
parent 36513 5a029f049854
child 36515 351323217fd3
py3: add b'' prefixes in tests/test-revlog.t # skip-blame because just b'' prefixes Differential Revision: https://phab.mercurial-scm.org/D2508
tests/test-revlog.t
--- a/tests/test-revlog.t	Wed Feb 28 22:03:47 2018 +0530
+++ b/tests/test-revlog.t	Wed Feb 28 22:10:59 2018 +0530
@@ -4,7 +4,7 @@
 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!
@@ -13,7 +13,7 @@
 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!
@@ -22,7 +22,7 @@
 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"))