]> granicus.if.org Git - python/commitdiff
Fix test failure with -bb, because of r84040.
authorFlorent Xicluna <florent.xicluna@gmail.com>
Sat, 14 Aug 2010 23:12:27 +0000 (23:12 +0000)
committerFlorent Xicluna <florent.xicluna@gmail.com>
Sat, 14 Aug 2010 23:12:27 +0000 (23:12 +0000)
Lib/test/test_urllib.py

index 775d81099294ac55952f6e0d27f7f11d64b51e73..4d389d72e4ebf8bb8a7b07b2a1463657f10fe665 100644 (file)
@@ -9,6 +9,7 @@ import unittest
 from test import support
 import os
 import tempfile
+import warnings
 
 def hexescape(char):
     """Escape char as RFC 2396 specifies"""
@@ -569,7 +570,8 @@ class UnquotingTests(unittest.TestCase):
                          "%s" % result)
         self.assertRaises((TypeError, AttributeError), urllib.parse.unquote, None)
         self.assertRaises((TypeError, AttributeError), urllib.parse.unquote, ())
-        with support.check_warnings():
+        with warnings.catch_warnings():
+            warnings.simplefilter('ignore', BytesWarning)
             self.assertRaises((TypeError, AttributeError), urllib.parse.unquote, b'')
 
     def test_unquoting_badpercent(self):