summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/tests/test_build_ext.py
diff options
context:
space:
mode:
authorTarek Ziadé <ziade.tarek@gmail.com>2009-07-08 22:42:43 (GMT)
committerTarek Ziadé <ziade.tarek@gmail.com>2009-07-08 22:42:43 (GMT)
commit556934b385b287add684c5022cfae64c93c5e0eb (patch)
treea450dc1c728ec021ede9b8721d7acb6796fc2d69 /Lib/distutils/tests/test_build_ext.py
parent74c96ec39920380ce081c3bd078e9045c95fcc34 (diff)
downloadcpython-556934b385b287add684c5022cfae64c93c5e0eb.zip
cpython-556934b385b287add684c5022cfae64c93c5e0eb.tar.gz
cpython-556934b385b287add684c5022cfae64c93c5e0eb.tar.bz2
Merged revisions 73895 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r73895 | tarek.ziade | 2009-07-09 00:40:51 +0200 (Thu, 09 Jul 2009) | 1 line Sets the compiler attribute to keep the old behavior for third-party packages. ........
Diffstat (limited to 'Lib/distutils/tests/test_build_ext.py')
-rw-r--r--Lib/distutils/tests/test_build_ext.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/Lib/distutils/tests/test_build_ext.py b/Lib/distutils/tests/test_build_ext.py
index d531293..6829583 100644
--- a/Lib/distutils/tests/test_build_ext.py
+++ b/Lib/distutils/tests/test_build_ext.py
@@ -402,12 +402,21 @@ class BuildExtTestCase(TempdirManager,
dist = Distribution()
cmd = build_ext(dist)
+ class MyCompiler(object):
+ def do_something(self):
+ pass
+
with check_warnings() as w:
warnings.simplefilter("always")
- cmd.compiler = object()
+ cmd.compiler = MyCompiler()
self.assertEquals(len(w.warnings), 1)
cmd.compile = 'unix'
self.assertEquals(len(w.warnings), 1)
+ cmd.compiler = MyCompiler()
+ cmd.compiler.do_something()
+ # two more warnings genereated by the get
+ # and the set
+ self.assertEquals(len(w.warnings), 3)
def test_suite():
src = _get_source_filename()