fixed the test for win32 CompileError

This commit is contained in:
Tarek Ziadé 2009-03-31 22:47:01 +00:00
parent 2bdefb3eee
commit 3bb5a9642b
1 changed files with 3 additions and 1 deletions

View File

@ -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})