changeset 39788:69defbb83be7

py3: use '%d' for integers instead of '%s' 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. Differential Revision: https://phab.mercurial-scm.org/D4696
author Pulkit Goyal <pulkit@yandex-team.ru>
date Sun, 23 Sep 2018 23:35:38 +0300
parents e05d7c71f209
children e961f18a0094
files tests/test-bdiff.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-bdiff.py	Sun Sep 23 23:34:22 2018 +0300
+++ b/tests/test-bdiff.py	Sun Sep 23 23:35:38 2018 +0300
@@ -117,8 +117,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'),