Silence BytesWarning while testing exception

This commit is contained in:
Florent Xicluna 2010-08-14 20:51:58 +00:00
parent 82a3f8afcb
commit 62829dc727

View 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