mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
fixed the test for win32 CompileError
This commit is contained in:
parent
2bdefb3eee
commit
3bb5a9642b
1 changed files with 3 additions and 1 deletions
|
@ -10,6 +10,7 @@ from distutils import sysconfig
|
|||
from distutils.tests import support
|
||||
from distutils.extension import Extension
|
||||
from distutils.errors import UnknownFileError
|
||||
from distutils.errors import CompileError
|
||||
|
||||
import unittest
|
||||
from test import test_support
|
||||
|
@ -154,7 +155,8 @@ class BuildExtTestCase(support.TempdirManager,
|
|||
dist = Distribution({'name': 'xx', 'ext_modules': modules})
|
||||
cmd = build_ext(dist)
|
||||
cmd.ensure_finalized()
|
||||
self.assertRaises(UnknownFileError, cmd.run) # should raise an error
|
||||
self.assertRaises((UnknownFileError, CompileError),
|
||||
cmd.run) # should raise an error
|
||||
|
||||
modules = [Extension('foo', ['xxx'], optional=True)]
|
||||
dist = Distribution({'name': 'xx', 'ext_modules': modules})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue