Silence UnicodeWarning in crazy unittest test.
diff --git a/Lib/test/test_unittest.py b/Lib/test/test_unittest.py
index d3bab2a..df760a7 100644
--- a/Lib/test/test_unittest.py
+++ b/Lib/test/test_unittest.py
@@ -16,6 +16,7 @@
 from copy import deepcopy
 from cStringIO import StringIO
 import pickle
+import warnings
 
 
 ### Support code
@@ -2573,10 +2574,12 @@
         with self.assertRaises(self.failureException):
             self.assertDictContainsSubset({'a': 1, 'c': 1}, {'a': 1})
 
-        one = ''.join(chr(i) for i in range(255))
-        # this used to cause a UnicodeDecodeError constructing the failure msg
-        with self.assertRaises(self.failureException):
-            self.assertDictContainsSubset({'foo': one}, {'foo': u'\uFFFD'})
+        with warnings.catch_warnings(record=True):
+            # silence the UnicodeWarning
+            one = ''.join(chr(i) for i in range(255))
+            # this used to cause a UnicodeDecodeError constructing the failure msg
+            with self.assertRaises(self.failureException):
+                self.assertDictContainsSubset({'foo': one}, {'foo': u'\uFFFD'})
 
     def testAssertEqual(self):
         equal_pairs = [