summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/tests/test_build_ext.py
diff options
context:
space:
mode:
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()