Merged revisions 79165 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r79165 | florent.xicluna | 2010-03-21 03:14:24 +0200 (Sun, 21 Mar 2010) | 2 lines
#7092 - Silence more py3k deprecation warnings, using test_support.check_py3k_warnings() helper.
........
diff --git a/Lib/test/test_peepholer.py b/Lib/test/test_peepholer.py
index c547984..2985cc2 100644
--- a/Lib/test/test_peepholer.py
+++ b/Lib/test/test_peepholer.py
@@ -207,17 +207,20 @@
import sys
from test import test_support
test_classes = (TestTranforms,)
- test_support.run_unittest(*test_classes)
- # verify reference counting
- if verbose and hasattr(sys, "gettotalrefcount"):
- import gc
- counts = [None] * 5
- for i in xrange(len(counts)):
- test_support.run_unittest(*test_classes)
- gc.collect()
- counts[i] = sys.gettotalrefcount()
- print counts
+ with test_support._check_py3k_warnings(
+ ("backquote not supported", SyntaxWarning)):
+ test_support.run_unittest(*test_classes)
+
+ # verify reference counting
+ if verbose and hasattr(sys, "gettotalrefcount"):
+ import gc
+ counts = [None] * 5
+ for i in xrange(len(counts)):
+ test_support.run_unittest(*test_classes)
+ gc.collect()
+ counts[i] = sys.gettotalrefcount()
+ print counts
if __name__ == "__main__":
test_main(verbose=True)