Mercurial > hg
diff tests/flagprocessorext.py @ 35570:3e3f4c03876b
tests: add b'' to string literals where bytes are required
Since we are internally dealing with bytes only, we need to use bytes in the
tests too. This is one of the many patches which will make all the tests
completely use bytes.
# skip-blame because we are just adding b''
Differential Revision: https://phab.mercurial-scm.org/D1788
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Fri, 29 Dec 2017 03:37:36 +0530 |
parents | 77f746e5383a |
children | 83246d6920f2 |
line wrap: on
line diff
--- a/tests/flagprocessorext.py Wed Jan 10 08:53:22 2018 -0800 +++ b/tests/flagprocessorext.py Fri Dec 29 03:37:36 2017 +0530 @@ -58,7 +58,7 @@ def noopaddrevision(orig, self, text, transaction, link, p1, p2, cachedelta=None, node=None, flags=revlog.REVIDX_DEFAULT_FLAGS): - if '[NOOP]' in text: + if b'[NOOP]' in text: flags |= REVIDX_NOOP return orig(self, text, transaction, link, p1, p2, cachedelta=cachedelta, node=node, flags=flags) @@ -66,7 +66,7 @@ def b64addrevision(orig, self, text, transaction, link, p1, p2, cachedelta=None, node=None, flags=revlog.REVIDX_DEFAULT_FLAGS): - if '[BASE64]' in text: + if b'[BASE64]' in text: flags |= REVIDX_BASE64 return orig(self, text, transaction, link, p1, p2, cachedelta=cachedelta, node=node, flags=flags) @@ -74,7 +74,7 @@ def gzipaddrevision(orig, self, text, transaction, link, p1, p2, cachedelta=None, node=None, flags=revlog.REVIDX_DEFAULT_FLAGS): - if '[GZIP]' in text: + if b'[GZIP]' in text: flags |= REVIDX_GZIP return orig(self, text, transaction, link, p1, p2, cachedelta=cachedelta, node=node, flags=flags) @@ -84,7 +84,7 @@ flags=revlog.REVIDX_DEFAULT_FLAGS): # This addrevision wrapper is meant to add a flag we will not have # transforms registered for, ensuring we handle this error case. - if '[FAIL]' in text: + if b'[FAIL]' in text: flags |= REVIDX_FAIL return orig(self, text, transaction, link, p1, p2, cachedelta=cachedelta, node=node, flags=flags)