diff options
author | Larry Hastings <larry@hastings.org> | 2015-09-09 06:45:23 (GMT) |
---|---|---|
committer | Larry Hastings <larry@hastings.org> | 2015-09-09 06:45:23 (GMT) |
commit | a1419d197c50217868d9b410aac9e301702902f5 (patch) | |
tree | b4979173dbfdf248d3c206e33dea74a4283ad69b | |
parent | c31b6d191fc9c792e920740663b3d96702c546cc (diff) | |
parent | bf74f37e70964211141b57179822cbaa0476a8e0 (diff) | |
download | cpython-a1419d197c50217868d9b410aac9e301702902f5.zip cpython-a1419d197c50217868d9b410aac9e301702902f5.tar.gz cpython-a1419d197c50217868d9b410aac9e301702902f5.tar.bz2 |
Merged in stevedower/cpython350 (pull request #23)
Moves distutils test import within skippable class.
-rw-r--r-- | Lib/distutils/tests/test_msvccompiler.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/distutils/tests/test_msvccompiler.py b/Lib/distutils/tests/test_msvccompiler.py index 0b8a69f..874d603 100644 --- a/Lib/distutils/tests/test_msvccompiler.py +++ b/Lib/distutils/tests/test_msvccompiler.py @@ -3,8 +3,6 @@ import sys import unittest import os -import distutils._msvccompiler as _msvccompiler - from distutils.errors import DistutilsPlatformError from distutils.tests import support from test.support import run_unittest @@ -18,6 +16,7 @@ class msvccompilerTestCase(support.TempdirManager, unittest.TestCase): def test_no_compiler(self): + import distutils._msvccompiler as _msvccompiler # makes sure query_vcvarsall raises # a DistutilsPlatformError if the compiler # is not found @@ -34,6 +33,7 @@ class msvccompilerTestCase(support.TempdirManager, _msvccompiler._find_vcvarsall = old_find_vcvarsall def test_compiler_options(self): + import distutils._msvccompiler as _msvccompiler # suppress path to vcruntime from _find_vcvarsall to # check that /MT is added to compile options old_find_vcvarsall = _msvccompiler._find_vcvarsall @@ -50,6 +50,7 @@ class msvccompilerTestCase(support.TempdirManager, _msvccompiler._find_vcvarsall = old_find_vcvarsall def test_vcruntime_copy(self): + import distutils._msvccompiler as _msvccompiler # force path to a known file - it doesn't matter # what we copy as long as its name is not in # _msvccompiler._BUNDLED_DLLS @@ -69,6 +70,8 @@ class msvccompilerTestCase(support.TempdirManager, _msvccompiler._find_vcvarsall = old_find_vcvarsall def test_vcruntime_skip_copy(self): + import distutils._msvccompiler as _msvccompiler + tempdir = self.mkdtemp() compiler = _msvccompiler.MSVCCompiler() compiler.initialize() |