summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_urllib.py
diff options
context:
space:
mode:
authorFlorent Xicluna <florent.xicluna@gmail.com>2010-08-14 23:12:27 (GMT)
committerFlorent Xicluna <florent.xicluna@gmail.com>2010-08-14 23:12:27 (GMT)
commit99e472e84dbec06b54c1e72fe04abd510c847e03 (patch)
tree70a09f781dab48aaa76582f7ec15a55a1bb215c4 /Lib/test/test_urllib.py
parent16c16609480c9c9c76e665b1f8fb80e9eec6369a (diff)
downloadcpython-99e472e84dbec06b54c1e72fe04abd510c847e03.zip
cpython-99e472e84dbec06b54c1e72fe04abd510c847e03.tar.gz
cpython-99e472e84dbec06b54c1e72fe04abd510c847e03.tar.bz2
Fix test failure with -bb, because of r84040.
Diffstat (limited to 'Lib/test/test_urllib.py')
-rw-r--r--Lib/test/test_urllib.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py
index 775d810..4d389d7 100644
--- a/Lib/test/test_urllib.py
+++ b/Lib/test/test_urllib.py
@@ -9,6 +9,7 @@ import unittest
from test import support
import os
import tempfile
+import warnings
def hexescape(char):
"""Escape char as RFC 2396 specifies"""
@@ -569,7 +570,8 @@ class UnquotingTests(unittest.TestCase):
"%s" % result)
self.assertRaises((TypeError, AttributeError), urllib.parse.unquote, None)
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'')
def test_unquoting_badpercent(self):