Mercurial > hg
changeset 39789:e961f18a0094
tests: use assertTrue() instead of assert_() in test-bdiff.py
The later is deprecated in Python 3.
This patch also makes the test pass on Python 3.
Differential Revision: https://phab.mercurial-scm.org/D4697
author | Pulkit Goyal <pulkit@yandex-team.ru> |
---|---|
date | Sun, 23 Sep 2018 23:39:07 +0300 |
parents | 69defbb83be7 |
children | d3e940a32be0 |
files | contrib/python3-whitelist tests/test-bdiff.py |
diffstat | 2 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/python3-whitelist Sun Sep 23 23:35:38 2018 +0300 +++ b/contrib/python3-whitelist Sun Sep 23 23:39:07 2018 +0300 @@ -22,6 +22,7 @@ test-backwards-remove.t test-bad-pull.t test-basic.t +test-bdiff.py test-bheads.t test-bisect.t test-bisect2.t
--- a/tests/test-bdiff.py Sun Sep 23 23:35:38 2018 +0300 +++ b/tests/test-bdiff.py Sun Sep 23 23:39:07 2018 +0300 @@ -99,9 +99,9 @@ diffreplace(12, 12, b'', b'b\nc\n.\n'), b'd\ne\n', diffreplace(16, 18, b'.\n', b''), b'f\n'] - self.assert_(got in (want_c, want_pure), - 'got: %r, wanted either %r or %r' % ( - got, want_c, want_pure)) + self.assertTrue(got in (want_c, want_pure), + 'got: %r, wanted either %r or %r' % ( + got, want_c, want_pure)) def test_fixws(self): cases = [