From: Tarek Ziadé Date: Tue, 31 Mar 2009 22:47:01 +0000 (+0000) Subject: fixed the test for win32 CompileError X-Git-Tag: v2.7a1~1653 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3bb5a9642bc49ebab1ca0f4369f8e3ca485421d7;p=thirdparty%2FPython%2Fcpython.git fixed the test for win32 CompileError --- diff --git a/Lib/distutils/tests/test_build_ext.py b/Lib/distutils/tests/test_build_ext.py index a27696d8cb6a..9097bee2e45c 100644 --- a/Lib/distutils/tests/test_build_ext.py +++ b/Lib/distutils/tests/test_build_ext.py @@ -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})