Issue 26931: Skip the test_distutils tests using a compiler executable

that is not found
This commit is contained in:
Xavier de Gaye 2016-11-17 09:00:19 +01:00
parent 00305ade58
commit dfc13e069a
6 changed files with 46 additions and 25 deletions

View file

@ -17,6 +17,7 @@ from distutils.errors import DistutilsOptionError
from distutils.extension import Extension
from distutils.tests import support
from test import support as test_support
def _make_ext_name(modname):
@ -196,6 +197,9 @@ class InstallTestCase(support.TempdirManager,
self.assertEqual(found, expected)
def test_record_extensions(self):
cmd = test_support.missing_compiler_executable()
if cmd is not None:
self.skipTest('The %r command is not found' % cmd)
install_dir = self.mkdtemp()
project_dir, dist = self.create_dist(ext_modules=[
Extension('xx', ['xxmodule.c'])])