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
--- 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 = [