Skip to content

Commit 62829dc

Browse files
committed
Silence BytesWarning while testing exception
1 parent 82a3f8a commit 62829dc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/test/test_urllib.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,8 @@ def test_unquoting(self):
572572
"%s" % result)
573573
self.assertRaises((TypeError, AttributeError), urllib.parse.unquote, None)
574574
self.assertRaises((TypeError, AttributeError), urllib.parse.unquote, ())
575-
self.assertRaises((TypeError, AttributeError), urllib.parse.unquote, b'')
575+
with support.check_warnings(('', BytesWarning), quiet=True):
576+
self.assertRaises((TypeError, AttributeError), urllib.parse.unquote, b'')
576577

577578
def test_unquoting_badpercent(self):
578579
# Test unquoting on bad percent-escapes

0 commit comments

Comments
 (0)