]> granicus.if.org Git - python/commitdiff
Silence BytesWarning while testing exception
authorFlorent Xicluna <florent.xicluna@gmail.com>
Sat, 14 Aug 2010 20:51:58 +0000 (20:51 +0000)
committerFlorent Xicluna <florent.xicluna@gmail.com>
Sat, 14 Aug 2010 20:51:58 +0000 (20:51 +0000)
Lib/test/test_urllib.py

index 159fd8a77b9adf17462502de92df6b90b3b9a26c..35c7f5103a3d6e18cf192e2b313a705b73ec6dc7 100644 (file)
@@ -572,7 +572,8 @@ class UnquotingTests(unittest.TestCase):
                          "%s" % result)
         self.assertRaises((TypeError, AttributeError), urllib.parse.unquote, None)
         self.assertRaises((TypeError, AttributeError), urllib.parse.unquote, ())
-        self.assertRaises((TypeError, AttributeError), urllib.parse.unquote, b'')
+        with support.check_warnings(('', BytesWarning), quiet=True):
+            self.assertRaises((TypeError, AttributeError), urllib.parse.unquote, b'')
 
     def test_unquoting_badpercent(self):
         # Test unquoting on bad percent-escapes