Commits

Georg Brandl  committed 32d94f3

Make urllib tests pass for now. Will figure out what the correct semantics should be after release.

  • Participants
  • Parent commits c3b1362

Comments (0)

Files changed (1)

File Lib/test/test_urllib.py

         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
         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