[PATCH] tests: fix overspecific test checks

Maciej Fijalkowski fijall at gmail.com
Sun Apr 3 07:27:12 UTC 2016


# HG changeset patch
# User Maciej Fijalkowski <fijall at gmail.com>
# Date 1459668417 -3600
#      Sun Apr 03 08:26:57 2016 +0100
# Node ID 5536fa390c35717206f3092864db3430884a61d0
# Parent  25025eea0f6bf62d008d128868b53c7829c73297
tests: fix overspecific test checks

Those tests check a bit too specific message in ImportError/SyntaError.
Make test-hook and test-bad-extension pass on pypy

diff -r 25025eea0f6b -r 5536fa390c35 tests/test-bad-extension.t
--- a/tests/test-bad-extension.t	Thu Mar 31 15:37:21 2016 +0800
+++ b/tests/test-bad-extension.t	Sun Apr 03 08:26:57 2016 +0100
@@ -56,9 +56,9 @@
   could not import hgext.badext2 (No module named *badext2): trying badext2 (glob)
   Traceback (most recent call last):
   ImportError: No module named *badext2 (glob)
-  could not import hgext3rd.badext2 (No module named badext2): trying badext2
+  could not import hgext3rd.badext2 (No module named *badext2): trying badext2 (glob)
   Traceback (most recent call last):
-  ImportError: No module named badext2
+  ImportError: No module named *badext2 (glob)
   *** failed to import extension badext2: No module named badext2
   Traceback (most recent call last):
   ImportError: No module named badext2
diff -r 25025eea0f6b -r 5536fa390c35 tests/test-hook.t
--- a/tests/test-hook.t	Thu Mar 31 15:37:21 2016 +0800
+++ b/tests/test-hook.t	Sun Apr 03 08:26:57 2016 +0100
@@ -537,7 +537,7 @@
   searching for changes
   exception from first failed import attempt:
   Traceback (most recent call last):
-  SyntaxError: invalid syntax
+  SyntaxError: * (glob)
   exception from second failed import attempt:
   Traceback (most recent call last):
   ImportError: No module named hgext_syntaxerror


More information about the Mercurial-devel mailing list