Mercurial > hg-stable
changeset 43366:ee3a55c8fd0f stable
py3: fix exception message check in test-linerange.py's testOutOfRange
Differential Revision: https://phab.mercurial-scm.org/D7192
author | Emmanuel Leblond <emmanuel.leblond@gmail.com> |
---|---|
date | Fri, 01 Nov 2019 17:31:47 +0100 |
parents | 899e55e2d375 |
children | 3c2799cbace4 |
files | tests/test-linerange.py |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-linerange.py Fri Nov 01 17:35:36 2019 +0100 +++ b/tests/test-linerange.py Fri Nov 01 17:31:47 2019 +0100 @@ -2,6 +2,7 @@ import unittest from mercurial import error, mdiff +from mercurial.utils import stringutil # for readability, line numbers are 0-origin text1 = b''' @@ -228,7 +229,10 @@ try: mdiff.blocksinrange(self.blocks, linerange2) except exctype as exc: - self.assertTrue('line range exceeds file size' in str(exc)) + self.assertTrue( + b'line range exceeds file size' + in stringutil.forcebytestr(exc) + ) else: self.fail('%s not raised' % exctype.__name__)