]> granicus.if.org Git - python/commitdiff
fixed the test for win32 CompileError
authorTarek Ziadé <ziade.tarek@gmail.com>
Tue, 31 Mar 2009 22:47:01 +0000 (22:47 +0000)
committerTarek Ziadé <ziade.tarek@gmail.com>
Tue, 31 Mar 2009 22:47:01 +0000 (22:47 +0000)
Lib/distutils/tests/test_build_ext.py

index a27696d8cb6ab120701ba4ab115f6dc43445440e..9097bee2e45c43b69dfe85f2d3c42e6c6e7f20d5 100644 (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})