changeset 31487:07fe520280d2

tests: allow ModuleNotFoundError in addition to ImportError My environment (Python version? PYTHONPATH? something else?) raises ModuleNotFoundError in test-check-py3-compat.t. This patch allows any "*Error". The error string contains "error importing", so it seems specific enough even after.
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 17 Mar 2017 09:58:49 -0700
parents 96929bd6e58d
children a7c687c35119
files tests/test-check-py3-compat.t
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-check-py3-compat.t	Wed Mar 15 20:34:26 2017 -0400
+++ b/tests/test-check-py3-compat.t	Fri Mar 17 09:58:49 2017 -0700
@@ -22,15 +22,15 @@
   $ hg files 'set:(**.py) - grep(pygments)' -X hgext/fsmonitor/pywatchman \
   > | sed 's|\\|/|g' | xargs $PYTHON3 contrib/check-py3-compat.py \
   > | sed 's/[0-9][0-9]*)$/*)/'
-  hgext/convert/transport.py: error importing: <ImportError> No module named 'svn.client' (error at transport.py:*)
+  hgext/convert/transport.py: error importing: <*Error> No module named 'svn.client' (error at transport.py:*) (glob)
   hgext/fsmonitor/state.py: error importing: <SyntaxError> from __future__ imports must occur at the beginning of the file (__init__.py, line 30) (error at watchmanclient.py:*)
   hgext/fsmonitor/watchmanclient.py: error importing: <SyntaxError> from __future__ imports must occur at the beginning of the file (__init__.py, line 30) (error at watchmanclient.py:*)
-  mercurial/cffi/bdiff.py: error importing: <ImportError> No module named 'mercurial.cffi' (error at check-py3-compat.py:*)
-  mercurial/cffi/mpatch.py: error importing: <ImportError> No module named 'mercurial.cffi' (error at check-py3-compat.py:*)
-  mercurial/cffi/osutil.py: error importing: <ImportError> No module named 'mercurial.cffi' (error at check-py3-compat.py:*)
-  mercurial/scmwindows.py: error importing: <ImportError> No module named 'msvcrt' (error at win32.py:*)
-  mercurial/win32.py: error importing: <ImportError> No module named 'msvcrt' (error at win32.py:*)
-  mercurial/windows.py: error importing: <ImportError> No module named 'msvcrt' (error at windows.py:*)
+  mercurial/cffi/bdiff.py: error importing: <*Error> No module named 'mercurial.cffi' (error at check-py3-compat.py:*) (glob)
+  mercurial/cffi/mpatch.py: error importing: <*Error> No module named 'mercurial.cffi' (error at check-py3-compat.py:*) (glob)
+  mercurial/cffi/osutil.py: error importing: <*Error> No module named 'mercurial.cffi' (error at check-py3-compat.py:*) (glob)
+  mercurial/scmwindows.py: error importing: <*Error> No module named 'msvcrt' (error at win32.py:*) (glob)
+  mercurial/win32.py: error importing: <*Error> No module named 'msvcrt' (error at win32.py:*) (glob)
+  mercurial/windows.py: error importing: <*Error> No module named 'msvcrt' (error at windows.py:*) (glob)
 
 #endif