Patchwork D2354: py3: add b'' prefixes in test-mdiff.py

login
register
mail settings
Submitter phabricator
Date Feb. 19, 2018, 4:41 p.m.
Message ID <differential-rev-PHID-DREV-7l7oo37pldlinelaplyn-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/28160/
State Superseded
Headers show

Comments

phabricator - Feb. 19, 2018, 4:41 p.m.
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  1. skip-blame because we are just adding b''

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  tests/test-mdiff.py

CHANGE DETAILS




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

Patch

diff --git a/tests/test-mdiff.py b/tests/test-mdiff.py
--- a/tests/test-mdiff.py
+++ b/tests/test-mdiff.py
@@ -10,11 +10,11 @@ 
 class splitnewlinesTests(unittest.TestCase):
 
     def test_splitnewlines(self):
-        cases = {'a\nb\nc\n': ['a\n', 'b\n', 'c\n'],
-                 'a\nb\nc': ['a\n', 'b\n', 'c'],
-                 'a\nb\nc\n\n': ['a\n', 'b\n', 'c\n', '\n'],
-                 '': [],
-                 'abcabc': ['abcabc'],
+        cases = {b'a\nb\nc\n': [b'a\n', b'b\n', b'c\n'],
+                 b'a\nb\nc': [b'a\n', b'b\n', b'c'],
+                 b'a\nb\nc\n\n': [b'a\n', b'b\n', b'c\n', b'\n'],
+                 b'': [],
+                 b'abcabc': [b'abcabc'],
                  }
         for inp, want in cases.items():
             self.assertEqual(mdiff.splitnewlines(inp), want)