From: Florent Xicluna Date: Sat, 14 Aug 2010 23:12:27 +0000 (+0000) Subject: Fix test failure with -bb, because of r84040. X-Git-Tag: v3.1.3rc1~340 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=99e472e84dbec06b54c1e72fe04abd510c847e03;p=python Fix test failure with -bb, because of r84040. --- diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py index 775d810992..4d389d72e4 100644 --- a/Lib/test/test_urllib.py +++ b/Lib/test/test_urllib.py @@ -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):