Fix test failure with -bb, because of r84040.

This commit is contained in:
Florent Xicluna 2010-08-14 23:12:27 +00:00
parent 16c1660948
commit 99e472e84d
1 changed files with 3 additions and 1 deletions

View File

@ -9,6 +9,7 @@ import unittest
from test import support from test import support
import os import os
import tempfile import tempfile
import warnings
def hexescape(char): def hexescape(char):
"""Escape char as RFC 2396 specifies""" """Escape char as RFC 2396 specifies"""
@ -569,7 +570,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, ())
with support.check_warnings(): with warnings.catch_warnings():
warnings.simplefilter('ignore', BytesWarning)
self.assertRaises((TypeError, AttributeError), urllib.parse.unquote, b'') self.assertRaises((TypeError, AttributeError), urllib.parse.unquote, b'')
def test_unquoting_badpercent(self): def test_unquoting_badpercent(self):