Patchwork D3282: py3: add b'' prefixes in tests/test-linerange.py

login
register
mail settings
Submitter phabricator
Date April 12, 2018, 3:08 p.m.
Message ID <3d9266706458f7498d4d30cd48e1aab0@localhost.localdomain>
Download mbox | patch
Permalink /patch/30793/
State Not Applicable
Headers show

Comments

phabricator - April 12, 2018, 3:08 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG6939b6ac960a: py3: add b&#039;&#039; prefixes in tests/test-linerange.py (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3282?vs=8049&id=8061

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

AFFECTED FILES
  tests/test-linerange.py

CHANGE DETAILS




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

Patch

diff --git a/tests/test-linerange.py b/tests/test-linerange.py
--- a/tests/test-linerange.py
+++ b/tests/test-linerange.py
@@ -4,7 +4,7 @@ 
 from mercurial import error, mdiff
 
 # for readability, line numbers are 0-origin
-text1 = '''
+text1 = b'''
            00 at OLD
            01 at OLD
            02 at OLD
@@ -19,7 +19,7 @@ 
            11 at OLD
 '''[1:] # strip initial LF
 
-text2 = '''
+text2 = b'''
 00 at NEW
 01 at NEW
 02 at NEW, 03 at OLD
@@ -47,10 +47,10 @@ 
     def setUp(self):
         self.blocks = list(mdiff.allblocks(text1, text2))
         assert self.blocks == [
-            ([0, 3, 0, 2], '!'),
-            ((3, 7, 2, 6), '='),
-            ([7, 12, 6, 12], '!'),
-            ((12, 12, 12, 12), '='),
+            ([0, 3, 0, 2], b'!'),
+            ((3, 7, 2, 6), b'='),
+            ([7, 12, 6, 12], b'!'),
+            ((12, 12, 12, 12), b'='),
         ], self.blocks
 
     def testWithinEqual(self):