Patchwork D6456: testparseutil: fix doctest to use str instead of bytes

login
register
mail settings
Submitter phabricator
Date May 29, 2019, 2:14 p.m.
Message ID <differential-rev-PHID-DREV-l5fyo4clqtavtv32kcqu-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/40262/
State Superseded
Headers show

Comments

phabricator - May 29, 2019, 2:14 p.m.
durin42 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/D6456

AFFECTED FILES
  contrib/testparseutil.py

CHANGE DETAILS




To: durin42, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/contrib/testparseutil.py b/contrib/testparseutil.py
--- a/contrib/testparseutil.py
+++ b/contrib/testparseutil.py
@@ -255,7 +255,7 @@ 
 class fileheredocmatcher(embeddedmatcher):
     """Detect "cat > FILE << LIMIT" style embedded code
 
-    >>> matcher = fileheredocmatcher(b'heredoc .py file', br'[^<]+\\.py')
+    >>> matcher = fileheredocmatcher('heredoc .py file', r'[^<]+\\.py')
     >>> b2s(matcher.startsat('  $ cat > file.py << EOF\\n'))
     ('file.py', '  > EOF\\n')
     >>> b2s(matcher.startsat('  $ cat   >>file.py   <<EOF\\n'))