[Checkins] SVN: zope.testrunner/trunk/src/zope/testrunner/tests.py Fix tests: Python 3.3 has better ImportError messages.

Marius Gedminas cvs-admin at zope.org
Fri Feb 8 08:54:37 UTC 2013


Log message for revision 129211:
  Fix tests: Python 3.3 has better ImportError messages.
  
  

Changed:
  U   zope.testrunner/trunk/src/zope/testrunner/tests.py

-=-
Modified: zope.testrunner/trunk/src/zope/testrunner/tests.py
===================================================================
--- zope.testrunner/trunk/src/zope/testrunner/tests.py	2013-02-08 08:53:23 UTC (rev 129210)
+++ zope.testrunner/trunk/src/zope/testrunner/tests.py	2013-02-08 08:54:36 UTC (rev 129211)
@@ -89,6 +89,11 @@
          r''),
         #(re.compile('^> [^\n]+->None$', re.M), '> ...->None'),
         (re.compile('import pdb; pdb'), 'Pdb()'), # Py 2.3
+
+        # Python 3.3 has better exception messages
+        (re.compile("ImportError: No module named '(?:[^']*[.])?([^'.]*)'"),
+         r'ImportError: No module named \1'),
+
         ])
 else:
     #*nix
@@ -139,6 +144,11 @@
                     re.MULTILINE),
          r''),
         (re.compile('import pdb; pdb'), 'Pdb()'), # Py 2.3
+
+        # Python 3.3 has better exception messages
+        (re.compile("ImportError: No module named '(?:[^']*[.])?([^'.]*)'"),
+         r'ImportError: No module named \1'),
+
         ])
 
 def setUp(test):



More information about the checkins mailing list