tests/test-trusted.py
changeset 45903 c9b14c56fc2b
parent 43076 2372284d9457
child 45909 9dc1351d0b5f
--- a/tests/test-trusted.py	Thu Nov 19 15:13:39 2020 -0800
+++ b/tests/test-trusted.py	Fri Nov 20 10:22:58 2020 -0800
@@ -254,26 +254,15 @@
 f.write(b'foo')
 f.close()
 
-# This is a hack to remove b'' prefixes from ParseError.__bytes__ on
-# Python 3.
-def normalizeparseerror(e):
-    if pycompat.ispy3:
-        args = [a.decode('utf-8') for a in e.args]
-    else:
-        args = e.args
-
-    return error.ParseError(*args)
-
-
 try:
     testui(user=b'abc', group=b'def', silent=True)
 except error.ParseError as inst:
-    bprint(normalizeparseerror(inst))
+    bprint(inst.format())
 
 try:
     testui(debug=True, silent=True)
 except error.ParseError as inst:
-    bprint(normalizeparseerror(inst))
+    bprint(inst.format())
 
 print()
 bprint(b'# access typed information')