From: Georg Brandl Date: Sat, 31 Jul 2010 08:20:02 +0000 (+0000) Subject: Make urllib tests pass for now. Will figure out what the correct semantics should... X-Git-Tag: v3.2a1~21 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=604ef370b329231bd0f1e7a7e69754cb9a2e67af;p=thirdparty%2FPython%2Fcpython.git Make urllib tests pass for now. Will figure out what the correct semantics should be after release. --- diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py index 23492fb3bb72..c68fe54b9398 100644 --- a/Lib/test/test_urllib.py +++ b/Lib/test/test_urllib.py @@ -555,8 +555,8 @@ class UnquotingTests(unittest.TestCase): self.assertEqual(result.count('%'), 1, "using unquote(): not all characters escaped: " "%s" % result) - self.assertRaises(TypeError, urllib.parse.unquote, None) - self.assertRaises(TypeError, urllib.parse.unquote, ()) + self.assertRaises((TypeError, AttributeError), urllib.parse.unquote, None) + self.assertRaises((TypeError, AttributeError), urllib.parse.unquote, ()) def test_unquoting_badpercent(self): # Test unquoting on bad percent-escapes @@ -591,8 +591,8 @@ class UnquotingTests(unittest.TestCase): result = urllib.parse.unquote_to_bytes(given) self.assertEqual(expect, result, "using unquote_to_bytes(): %r != %r" % (expect, result)) - self.assertRaises(TypeError, urllib.parse.unquote_to_bytes, None) - self.assertRaises(TypeError, urllib.parse.unquote_to_bytes, ()) + self.assertRaises((TypeError, AttributeError), urllib.parse.unquote_to_bytes, None) + self.assertRaises((TypeError, AttributeError), urllib.parse.unquote_to_bytes, ()) def test_unquoting_mixed_case(self): # Test unquoting on mixed-case hex digits in the percent-escapes