py3: use '%d' for integers instead of '%s'
authorPulkit Goyal <pulkit@yandex-team.ru>
Sun, 23 Sep 2018 23:35:38 +0300
changeset 39788 69defbb83be7
parent 39787 e05d7c71f209
child 39789 e961f18a0094
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
tests/test-bdiff.py
--- 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'),