mirror of
https://github.com/python/cpython.git
synced 2025-07-28 21:55:21 +00:00
When open_urlresource() fails, HTTPException is another possible error
This commit is contained in:
parent
0306894fb1
commit
2dab865ff1
2 changed files with 4 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
|||
from test.test_support import run_unittest, open_urlresource
|
||||
import unittest
|
||||
|
||||
from httplib import HTTPException
|
||||
import sys
|
||||
import os
|
||||
from unicodedata import normalize, unidata_version
|
||||
|
@ -43,7 +44,7 @@ class NormalizationTest(unittest.TestCase):
|
|||
# Hit the exception early
|
||||
try:
|
||||
open_urlresource(TESTDATAURL)
|
||||
except IOError:
|
||||
except (IOError, HTTPException):
|
||||
self.skipTest("Could not retrieve " + TESTDATAURL)
|
||||
for line in open_urlresource(TESTDATAURL):
|
||||
if '#' in line:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue