summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/test/test_multibytecodec_support.py3
-rw-r--r--Lib/test/test_normalization.py3
2 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test_multibytecodec_support.py b/Lib/test/test_multibytecodec_support.py
index e4036bf..75b3363 100644
--- a/Lib/test/test_multibytecodec_support.py
+++ b/Lib/test/test_multibytecodec_support.py
@@ -6,6 +6,7 @@
import sys, codecs
import unittest, re
+from http.client import HTTPException
from test import support
from io import BytesIO
@@ -278,7 +279,7 @@ class TestBase_Mapping(unittest.TestCase):
unittest.TestCase.__init__(self, *args, **kw)
try:
self.open_mapping_file() # test it to report the error early
- except IOError:
+ except (IOError, HTTPException):
self.skipTest("Could not retrieve "+self.mapfileurl)
def open_mapping_file(self):
diff --git a/Lib/test/test_normalization.py b/Lib/test/test_normalization.py
index 6641554..19fe48d 100644
--- a/Lib/test/test_normalization.py
+++ b/Lib/test/test_normalization.py
@@ -1,6 +1,7 @@
from test.support import run_unittest, open_urlresource
import unittest
+from http.client import HTTPException
import sys
import os
from unicodedata import normalize, unidata_version
@@ -45,7 +46,7 @@ class NormalizationTest(unittest.TestCase):
# Hit the exception early
try:
open_urlresource(TESTDATAURL, encoding="utf-8")
- except IOError:
+ except (IOError, HTTPException):
self.skipTest("Could not retrieve " + TESTDATAURL)
for line in open_urlresource(TESTDATAURL, encoding="utf-8"):
if '#' in line: