[Python-checkins] cpython: Try to debug a Windows failure on the buildbots.

brett.cannon python-checkins at python.org
Fri Apr 20 19:34:39 CEST 2012


http://hg.python.org/cpython/rev/b0b0c8b175b6
changeset:   76431:b0b0c8b175b6
user:        Brett Cannon <brett at python.org>
date:        Fri Apr 20 13:34:35 2012 -0400
summary:
  Try to debug a Windows failure on the buildbots.

files:
  Lib/test/test_import.py |  5 ++++-
  1 files changed, 4 insertions(+), 1 deletions(-)


diff --git a/Lib/test/test_import.py b/Lib/test/test_import.py
--- a/Lib/test/test_import.py
+++ b/Lib/test/test_import.py
@@ -337,7 +337,7 @@
             del sys.path[0]
             remove_files(TESTFN)
 
-    @unittest.skipUnless(sys.platform == "win32", "Windows specific")
+    @unittest.skipUnless(sys.platform == "win32", "Windows-specific")
     def test_extension_import_fail(self):
         # Issue 1559549 added `name` and `path` attributes to ImportError
         # in order to provide better detail. Issue 10854 implemented those
@@ -352,6 +352,9 @@
                 import extension
             self.assertEqual(err.exception.name, pkg_name)
             # The path we get back has the dot-slash, e.g., ".\\extension.pyd"
+            self.assertIsNotNone(err.exception.path,
+                'unexpected None for ImportError.path: '
+                '{!r}'.format(err.exception))
             self.assertEqual(os.path.relpath(err.exception.path), pkg_file)
         finally:
             unlink(pkg_file)

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list