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/test_unicode.py b/Lib/test/test_unicode.py
index 53c7800..35134ec 100644
--- a/Lib/test/test_unicode.py
+++ b/Lib/test/test_unicode.py
@@ -511,9 +511,11 @@
         )
 
         if not sys.platform.startswith('java'):
+            with test_support._check_py3k_warnings():
+                buf = buffer('character buffers are decoded to unicode')
             self.assertEqual(
                 unicode(
-                    buffer('character buffers are decoded to unicode'),
+                    buf,
                     'utf-8',
                     'strict'
                 ),