Merged revisions 78758 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r78758 | florent.xicluna | 2010-03-07 14:18:33 +0200 (Sun, 07 Mar 2010) | 4 lines

  Issue #7849: Now the utility ``check_warnings`` verifies if the warnings are
  effectively raised.  A new utility ``check_py3k_warnings`` deals with py3k warnings.
........
diff --git a/Lib/test/string_tests.py b/Lib/test/string_tests.py
index 6bc681a..7e214eb 100644
--- a/Lib/test/string_tests.py
+++ b/Lib/test/string_tests.py
@@ -686,8 +686,9 @@
         EQ("bobobXbobob", "bobobobXbobobob", "replace", "bobob", "bob")
         EQ("BOBOBOB", "BOBOBOB", "replace", "bob", "bobby")
 
-        ba = buffer('a')
-        bb = buffer('b')
+        with test_support._check_py3k_warnings():
+            ba = buffer('a')
+            bb = buffer('b')
         EQ("bbc", "abc", "replace", ba, bb)
         EQ("aac", "abc", "replace", bb, ba)