summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/tests
diff options
context:
space:
mode:
authorTarek Ziadé <ziade.tarek@gmail.com>2009-07-06 13:52:17 (GMT)
committerTarek Ziadé <ziade.tarek@gmail.com>2009-07-06 13:52:17 (GMT)
commitdd07ebb44a9c5c632d1a8177fcf617b5af1250ec (patch)
tree5da058bef0a469ebf8f7c2ea130a2bdbefd216e8 /Lib/distutils/tests
parent47137250ff31b8688ea1d988f993ac5fa57b5cc7 (diff)
downloadcpython-dd07ebb44a9c5c632d1a8177fcf617b5af1250ec.zip
cpython-dd07ebb44a9c5c632d1a8177fcf617b5af1250ec.tar.gz
cpython-dd07ebb44a9c5c632d1a8177fcf617b5af1250ec.tar.bz2
Merged revisions 73864 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r73864 | tarek.ziade | 2009-07-06 14:50:46 +0200 (Mon, 06 Jul 2009) | 1 line Fixed #6377: distutils compiler switch ignored (and added a deprecation warning if compiler is not used as supposed = a string option) ........
Diffstat (limited to 'Lib/distutils/tests')
-rw-r--r--Lib/distutils/tests/test_build_ext.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/Lib/distutils/tests/test_build_ext.py b/Lib/distutils/tests/test_build_ext.py
index 6f0e230..d531293 100644
--- a/Lib/distutils/tests/test_build_ext.py
+++ b/Lib/distutils/tests/test_build_ext.py
@@ -3,6 +3,9 @@ import os
import tempfile
import shutil
from io import StringIO
+import warnings
+from test.support import check_warnings
+from test.support import captured_stdout
from distutils.core import Extension, Distribution
from distutils.command.build_ext import build_ext
@@ -395,6 +398,17 @@ class BuildExtTestCase(TempdirManager,
wanted = os.path.join(curdir, 'twisted', 'runner', 'portmap.so')
self.assertEquals(wanted, path)
+ def test_compiler_deprecation_warning(self):
+ dist = Distribution()
+ cmd = build_ext(dist)
+
+ with check_warnings() as w:
+ warnings.simplefilter("always")
+ cmd.compiler = object()
+ self.assertEquals(len(w.warnings), 1)
+ cmd.compile = 'unix'
+ self.assertEquals(len(w.warnings), 1)
+
def test_suite():
src = _get_source_filename()
if not os.path.exists(src):