Mercurial > public > mercurial-scm > hg
diff tests/test-hgweb-auth.py @ 37940:31c37e703cee
tests: use stringutil.pprint instead of custom dumper in test-hgweb-auth.py
Differential Revision: https://phab.mercurial-scm.org/D3529
author | Augie Fackler <augie@google.com> |
---|---|
date | Fri, 27 Apr 2018 13:46:54 -0400 |
parents | 58c1368ab629 |
children | 32bc3815efae |
line wrap: on
line diff
--- a/tests/test-hgweb-auth.py Fri Apr 27 13:43:59 2018 -0400 +++ b/tests/test-hgweb-auth.py Fri Apr 27 13:46:54 2018 -0400 @@ -3,10 +3,14 @@ from mercurial import demandimport; demandimport.enable() from mercurial import ( error, + pycompat, ui as uimod, url, util, ) +from mercurial.utils import ( + stringutil, +) urlerr = util.urlerr urlreq = util.urlreq @@ -23,12 +27,8 @@ ui.setconfig('auth', name, value) return ui -def dumpdict(dict): - return '{' + ', '.join(['%s: %s' % (k, dict[k]) - for k in sorted(dict)]) + '}' - def test(auth, urls=None): - print('CFG:', dumpdict(auth)) + print('CFG:', pycompat.sysstr(stringutil.pprint(auth))) prefixes = set() for k in auth: prefixes.add(k.split('.', 1)[0])