Message196748
I just ran into this issue (same I believe) running the test suite with installed, versus repository, python on win7, but get a different traceback.
Traceback (most recent call last):
...\lib\distutils\tests\test_build_ext.py"
line 156, in test_optional_extension # or
line 316, in test_get_outputs
cmd.run) # should raise an error
...\lib\unittest\case.py", line 570, in assertRaises
return context.handle('assertRaises', callableObj, args, kwargs)
...\lib\unittest\case.py", line 135, in handle
callable_obj(*args, **kwargs)
...\lib\distutils\command\build_ext.py", line 354, in run
self.build_extensions()
...\lib\distutils\command\build_ext.py", line 463, in build_extensions
self.build_extension(ext)
...\lib\distutils\command\build_ext.py", line 518, in build_extension
depends=ext.depends)
...\lib\distutils\msvc9compiler.py", line 460, in compile
self.initialize()
...\lib\distutils\msvc9compiler.py", line 371, in initialize
vc_env = query_vcvarsall(VERSION, plat_spec)
...\lib\distutils\msvc9compiler.py", line 287, in query_vcvarsall
raise ValueError(str(list(result.keys())))
ValueError: ['path']
I agree with Éric that the test should be skipped if it cannot go on.
Wrapping
self.assertRaises((UnknownFileError, CompileError),
cmd.run) # should raise an error
and
cmd.run()
with
try:...except ValueError: <skip> would fix this issue on Windows. So would skipping if sys.platform == 'win32' and '+' not in sys.version (repository builds have a '+' and the test currently work for them). However, neither solution would work on *nix, which seems to have a completely different failure path to the same end result.
Are distutils and test_distutils maintained at all? msvc9compiler.py (2005) says it also works with vc10 (2008, used for 2.7) but makes no mention of vc11 (2010, used for 3.3,3.4).
Nick, what do you think we should do with this? I think that when python is installed and working as well as we expect, the test suite should pass, so any failures indicate a problem with the particular installation. I think this is especially important on Windows, with newbies who do not know distutils from, say, itertools. |
|
Date |
User |
Action |
Args |
2013-09-01 22:50:35 | terry.reedy | set | recipients:
+ terry.reedy, ncoghlan, tarek, eric.araujo, henry.precheur, alexis |
2013-09-01 22:50:35 | terry.reedy | set | messageid: <1378075835.26.0.838947780944.issue12420@psf.upfronthosting.co.za> |
2013-09-01 22:50:35 | terry.reedy | link | issue12420 messages |
2013-09-01 22:50:34 | terry.reedy | create | |
|