# HG changeset patch # User Pulkit Goyal # Date 1537735147 -10800 # Node ID e961f18a0094c4ace257e50e93b6073d9fef26c3 # Parent 69defbb83be7f0ae71a5f2e0b9c67d924b269e4a 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 diff -r 69defbb83be7 -r e961f18a0094 contrib/python3-whitelist --- 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 diff -r 69defbb83be7 -r e961f18a0094 tests/test-bdiff.py --- 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 = [