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:40:51 (GMT)
committerTarek Ziadé <ziade.tarek@gmail.com>2009-07-08 22:40:51 (GMT)
commit42b145d0e2f45e0744f8f45d89564f24fbc8b374 (patch)
tree8912117e6ca301ec0b74250dec0892bfbd67a831 /Lib/distutils/tests/test_build_ext.py
parent5fd3af24a25ff7fd6d87fb521cdd2b5f5c5d32ee (diff)
downloadcpython-42b145d0e2f45e0744f8f45d89564f24fbc8b374.zip
cpython-42b145d0e2f45e0744f8f45d89564f24fbc8b374.tar.gz
cpython-42b145d0e2f45e0744f8f45d89564f24fbc8b374.tar.bz2
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 afd0df3..9356ff8 100644
--- a/Lib/distutils/tests/test_build_ext.py
+++ b/Lib/distutils/tests/test_build_ext.py
@@ -402,12 +402,21 @@ class BuildExtTestCase(support.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()