Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
79bf42a8
Commit
79bf42a8
authored
Sep 13, 2010
by
Hirokazu Yamamoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #9313: Use unittest.skipUnless to skip old MSVC.
parent
3c73d1de
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
14 deletions
+5
-14
Lib/distutils/tests/test_msvc9compiler.py
Lib/distutils/tests/test_msvc9compiler.py
+5
-14
No files found.
Lib/distutils/tests/test_msvc9compiler.py
View file @
79bf42a8
...
...
@@ -60,7 +60,12 @@ _CLEANED_MANIFEST = """\
</dependency>
</assembly>"""
if
sys
.
platform
==
"win32"
:
from
distutils.msvccompiler
import
get_build_version
@
unittest
.
skipUnless
(
sys
.
platform
==
"win32"
,
"These tests are only for win32"
)
@
unittest
.
skipUnless
(
get_build_version
()
>=
8.0
,
"These tests are only for"
" MSVC8.0 or above"
)
class
msvc9compilerTestCase
(
support
.
TempdirManager
,
unittest
.
TestCase
):
...
...
@@ -68,10 +73,6 @@ class msvc9compilerTestCase(support.TempdirManager,
# makes sure query_vcvarsall throws
# a DistutilsPlatformError if the compiler
# is not found
from
distutils.msvccompiler
import
get_build_version
if
get_build_version
()
<
8.0
:
# this test is only for MSVC8.0 or above
return
from
distutils.msvc9compiler
import
query_vcvarsall
def
_find_vcvarsall
(
version
):
return
None
...
...
@@ -86,11 +87,6 @@ class msvc9compilerTestCase(support.TempdirManager,
msvc9compiler
.
find_vcvarsall
=
old_find_vcvarsall
def
test_reg_class
(
self
):
from
distutils.msvccompiler
import
get_build_version
if
get_build_version
()
<
8.0
:
# this test is only for MSVC8.0 or above
return
from
distutils.msvc9compiler
import
Reg
self
.
assertRaises
(
KeyError
,
Reg
.
get_value
,
'xxx'
,
'xxx'
)
...
...
@@ -109,11 +105,6 @@ class msvc9compilerTestCase(support.TempdirManager,
self
.
assertTrue
(
'Desktop'
in
keys
)
def
test_remove_visual_c_ref
(
self
):
from
distutils.msvccompiler
import
get_build_version
if
get_build_version
()
<
8.0
:
# this test is only for MSVC8.0 or above
return
from
distutils.msvc9compiler
import
MSVCCompiler
tempdir
=
self
.
mkdtemp
()
manifest
=
os
.
path
.
join
(
tempdir
,
'manifest'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment