[Python-checkins] r74121 - in sandbox/trunk/2to3/lib2to3/tests: test_pytree.py test_refactor.py
benjamin.peterson
python-checkins at python.org
Mon Jul 20 22:40:59 CEST 2009
Author: benjamin.peterson
Date: Mon Jul 20 22:40:59 2009
New Revision: 74121
Log:
try to make warning tests more robust
Modified:
sandbox/trunk/2to3/lib2to3/tests/test_pytree.py
sandbox/trunk/2to3/lib2to3/tests/test_refactor.py
Modified: sandbox/trunk/2to3/lib2to3/tests/test_pytree.py
==============================================================================
--- sandbox/trunk/2to3/lib2to3/tests/test_pytree.py (original)
+++ sandbox/trunk/2to3/lib2to3/tests/test_pytree.py Mon Jul 20 22:40:59 2009
@@ -31,6 +31,7 @@
def test_deprecated_prefix_methods(self):
l = pytree.Leaf(100, "foo")
with warnings.catch_warnings(record=True) as w:
+ warnings.simplefilter("always", DeprecationWarning)
self.assertEqual(l.get_prefix(), "")
l.set_prefix("hi")
self.assertEqual(l.prefix, "hi")
Modified: sandbox/trunk/2to3/lib2to3/tests/test_refactor.py
==============================================================================
--- sandbox/trunk/2to3/lib2to3/tests/test_refactor.py (original)
+++ sandbox/trunk/2to3/lib2to3/tests/test_refactor.py Mon Jul 20 22:40:59 2009
@@ -46,6 +46,7 @@
def test_print_function_option(self):
with warnings.catch_warnings(record=True) as w:
+ warnings.simplefilter("always", DeprecationWarning)
refactor.RefactoringTool(_DEFAULT_FIXERS, {"print_function" : True})
self.assertEqual(len(w), 1)
msg, = w
More information about the Python-checkins
mailing list