changeset 37881:672f51ec0d47

tests: use stringutil.pprint instead of pprint.pprint in test-minirst.py Stabilizes some output on Python 3. Differential Revision: https://phab.mercurial-scm.org/D3476
author Augie Fackler <augie@google.com>
date Fri, 27 Apr 2018 00:31:57 -0400
parents 1b230e19d044
children 3d24f708f7b6
files tests/test-minirst.py
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-minirst.py	Fri Apr 27 00:24:45 2018 -0400
+++ b/tests/test-minirst.py	Fri Apr 27 00:31:57 2018 -0400
@@ -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)
-