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

@ -2,7 +2,7 @@
import unittest
import os
import sys
from test.support import run_unittest
from test.support import run_unittest, missing_compiler_executable
from distutils.command.config import dump_file, config
from distutils.tests import support
@ -39,6 +39,9 @@ class ConfigTestCase(support.LoggingSilencer,
@unittest.skipIf(sys.platform == 'win32', "can't test on Windows")
def test_search_cpp(self):
cmd = missing_compiler_executable(['preprocessor'])
if cmd is not None:
self.skipTest('The %r command is not found' % cmd)
pkg_dir, dist = self.create_dist()
cmd = config(dist)