summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_import.py
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2012-04-20 17:34:35 (GMT)
committerBrett Cannon <brett@python.org>2012-04-20 17:34:35 (GMT)
commita2898c1d79ed3787d51a93a9ffb7c7c695b4a46e (patch)
tree9a2bb6044a726ddfad86608481b4353f0dc4a0c8 /Lib/test/test_import.py
parentc33f3f2339fd3217a0c6fe3df916616abab2fab4 (diff)
downloadcpython-a2898c1d79ed3787d51a93a9ffb7c7c695b4a46e.zip
cpython-a2898c1d79ed3787d51a93a9ffb7c7c695b4a46e.tar.gz
cpython-a2898c1d79ed3787d51a93a9ffb7c7c695b4a46e.tar.bz2
Try to debug a Windows failure on the buildbots.
Diffstat (limited to 'Lib/test/test_import.py')
-rw-r--r--Lib/test/test_import.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_import.py b/Lib/test/test_import.py
index 71a1cd5..9e7c5c0 100644
--- a/Lib/test/test_import.py
+++ b/Lib/test/test_import.py
@@ -337,7 +337,7 @@ class ImportTests(unittest.TestCase):
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 @@ class ImportTests(unittest.TestCase):
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)