Terry J. Reedy added the comment:
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.
----------
nosy: +ncoghlan, terry.reedy
versions: +Python 3.4 -Python 3.2
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue12420>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com