summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTarek Ziadé <ziade.tarek@gmail.com>2009-03-31 22:47:01 (GMT)
committerTarek Ziadé <ziade.tarek@gmail.com>2009-03-31 22:47:01 (GMT)
commit3bb5a9642bc49ebab1ca0f4369f8e3ca485421d7 (patch)
tree2d484560ccaed6ea67412a317e8d79cb5aaf656c
parent2bdefb3eeecf231c92ba6321cc7a64b5b5e4af0d (diff)
downloadcpython-3bb5a9642bc49ebab1ca0f4369f8e3ca485421d7.zip
cpython-3bb5a9642bc49ebab1ca0f4369f8e3ca485421d7.tar.gz
cpython-3bb5a9642bc49ebab1ca0f4369f8e3ca485421d7.tar.bz2
fixed the test for win32 CompileError
-rw-r--r--Lib/distutils/tests/test_build_ext.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/distutils/tests/test_build_ext.py b/Lib/distutils/tests/test_build_ext.py
index a27696d..9097bee 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})