Kaydet (Commit) 62829dc7 authored tarafından Florent Xicluna's avatar Florent Xicluna

Silence BytesWarning while testing exception

üst 82a3f8af
...@@ -572,7 +572,8 @@ class UnquotingTests(unittest.TestCase): ...@@ -572,7 +572,8 @@ class UnquotingTests(unittest.TestCase):
"%s" % result) "%s" % result)
self.assertRaises((TypeError, AttributeError), urllib.parse.unquote, None) self.assertRaises((TypeError, AttributeError), urllib.parse.unquote, None)
self.assertRaises((TypeError, AttributeError), urllib.parse.unquote, ()) 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): def test_unquoting_badpercent(self):
# Test unquoting on bad percent-escapes # Test unquoting on bad percent-escapes
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment