[PATCH 2 of 4] py3: add Python 3 exception output to test-hook.t

Denis Laxalde denis at laxalde.org
Fri Oct 18 10:52:23 EDT 2019


# HG changeset patch
# User Denis Laxalde <denis.laxalde at logilab.fr>
# Date 1571391884 -7200
#      Fri Oct 18 11:44:44 2019 +0200
# Node ID 4b3b99d99919d5140c5311975e142408627e61fa
# Parent  fe273205873f3cc3609fa8ce5f1a0f83221129cb
py3: add Python 3 exception output to test-hook.t

This is similar to, e.g., 3e9c6cef949b.

diff --git a/tests/test-hook.t b/tests/test-hook.t
index 64da3f0..1eeb537 100644
--- a/tests/test-hook.t
+++ b/tests/test-hook.t
@@ -980,7 +980,8 @@ different between Python 2.6 and Python 
   Traceback (most recent call last):
   ImportError: No module named hgext_syntaxerror
   Traceback (most recent call last):
-  HookLoadError: preoutgoing.syntaxerror hook is invalid: import of "syntaxerror" failed
+  HookLoadError: preoutgoing.syntaxerror hook is invalid: import of "syntaxerror" failed (no-py3 !)
+  mercurial.error.HookLoadError: b'preoutgoing.syntaxerror hook is invalid: import of "syntaxerror" failed' (py3 !)
   abort: preoutgoing.syntaxerror hook is invalid: import of "syntaxerror" failed
 
   $ echo '[hooks]' > ../a/.hg/hgrc
@@ -1139,7 +1140,8 @@ make sure --traceback works on hook impo
   Traceback (most recent call last):
   ImportError: No module named hgext_importfail
   Traceback (most recent call last):
-  HookLoadError: precommit.importfail hook is invalid: import of "importfail" failed
+  HookLoadError: precommit.importfail hook is invalid: import of "importfail" failed (no-py3 !)
+  mercurial.error.HookLoadError: b'precommit.importfail hook is invalid: import of "importfail" failed' (py3 !)
   abort: precommit.importfail hook is invalid: import of "importfail" failed
 
 Issue1827: Hooks Update & Commit not completely post operation


More information about the Mercurial-devel mailing list