Patchwork D3476: tests: use stringutil.pprint instead of pprint.pprint in test-minirst.py

login
register
mail settings
Submitter phabricator
Date May 8, 2018, 4:27 a.m.
Message ID <differential-rev-PHID-DREV-sh6vxj42i5lp6vec66gw-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/31329/
State Superseded
Headers show

Comments

phabricator - May 8, 2018, 4:27 a.m.
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Stabilizes some output on Python 3.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  tests/test-minirst.py

CHANGE DETAILS




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

Patch

diff --git a/tests/test-minirst.py b/tests/test-minirst.py
--- a/tests/test-minirst.py
+++ b/tests/test-minirst.py
@@ -1,8 +1,10 @@ 
 from __future__ import absolute_import, print_function
-import pprint
 from mercurial import (
     minirst,
 )
+from mercurial.utils import (
+    stringutil,
+)
 
 def debugformat(text, form, **kwargs):
     if form == 'html':
@@ -16,7 +18,7 @@ 
     if type(out) == tuple:
         print(out[0][:-1])
         print("-" * 70)
-        pprint.pprint(out[1])
+        print(stringutil.pprint(out[1], bprefix=False))
     else:
         print(out[:-1])
     print("-" * 70)
@@ -264,4 +266,3 @@ 
 print(table)
 
 debugformats(b'table+nl', table)
-