Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a2898c1

Browse files
committed
Try to debug a Windows failure on the buildbots.
1 parent c33f3f2 commit a2898c1

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Lib/test/test_import.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ def test_timestamp_overflow(self):
337337
del sys.path[0]
338338
remove_files(TESTFN)
339339

340-
@unittest.skipUnless(sys.platform == "win32", "Windows specific")
340+
@unittest.skipUnless(sys.platform == "win32", "Windows-specific")
341341
def test_extension_import_fail(self):
342342
# Issue 1559549 added `name` and `path` attributes to ImportError
343343
# in order to provide better detail. Issue 10854 implemented those
@@ -352,6 +352,9 @@ def test_extension_import_fail(self):
352352
import extension
353353
self.assertEqual(err.exception.name, pkg_name)
354354
# The path we get back has the dot-slash, e.g., ".\\extension.pyd"
355+
self.assertIsNotNone(err.exception.path,
356+
'unexpected None for ImportError.path: '
357+
'{!r}'.format(err.exception))
355358
self.assertEqual(os.path.relpath(err.exception.path), pkg_file)
356359
finally:
357360
unlink(pkg_file)

0 commit comments

Comments
 (0)