D7192: py3: fix exception message check in test-linerange.py's testOutOfRange

2019-11-01 Thread touilleMan (Leblond Emmanuel)
touilleMan created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D7192

AFFECTED FILES
  tests/test-linerange.py

CHANGE DETAILS

diff --git a/tests/test-linerange.py b/tests/test-linerange.py
--- a/tests/test-linerange.py
+++ b/tests/test-linerange.py
@@ -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,7 @@
 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__)
 



To: touilleMan, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D7192: py3: fix exception message check in test-linerange.py's testOutOfRange

2019-11-01 Thread touilleMan (Leblond Emmanuel)
Closed by commit rHG5c12a381fab3: py3: fix exception message check in 
test-linerange.py's testOutOfRange (authored by touilleMan).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7192?vs=17446&id=17455

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7192/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7192

AFFECTED FILES
  tests/test-linerange.py

CHANGE DETAILS

diff --git a/tests/test-linerange.py b/tests/test-linerange.py
--- a/tests/test-linerange.py
+++ b/tests/test-linerange.py
@@ -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,7 @@
 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__)
 



To: touilleMan, #hg-reviewers, indygreg
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel