D4696: py3: use '%d' for integers instead of '%s'

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Mon Sep 24 01:09:30 UTC 2018


pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Python 3 does not allow using "%s" for integers.
  
  This makes the test works on Python 3. The test still does not pass because
  there is a deprecation warning.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  tests/test-bdiff.py

CHANGE DETAILS

diff --git a/tests/test-bdiff.py b/tests/test-bdiff.py
--- a/tests/test-bdiff.py
+++ b/tests/test-bdiff.py
@@ -115,8 +115,8 @@
 
     def test_nice_diff_for_trivial_change(self):
         self.assertEqual(self.showdiff(
-            b''.join(b'<%s\n-\n' % i for i in range(5)),
-            b''.join(b'>%s\n-\n' % i for i in range(5))),
+            b''.join(b'<%d\n-\n' % i for i in range(5)),
+            b''.join(b'>%d\n-\n' % i for i in range(5))),
                          [diffreplace(0, 3, b'<0\n', b'>0\n'),
                           b'-\n',
                           diffreplace(5, 8, b'<1\n', b'>1\n'),



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


More information about the Mercurial-devel mailing list