Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Checkins

r76536 - in python/branches/py3k: Lib/test/test_multibytecodec_support.py Lib/test/test_normalization.py

 

 

Python checkins RSS feed   Index | Next | Previous | View Threaded


python-checkins at python

Nov 26, 2009, 6:20 AM

Post #1 of 1 (176 views)
Permalink
r76536 - in python/branches/py3k: Lib/test/test_multibytecodec_support.py Lib/test/test_normalization.py

Author: antoine.pitrou
Date: Thu Nov 26 13:38:23 2009
New Revision: 76536

Log:
Merged revisions 76535 via svnmerge from
svn+ssh://pythondev [at] svn/python/trunk

........
r76535 | antoine.pitrou | 2009-11-26 13:36:30 +0100 (jeu., 26 nov. 2009) | 3 lines

When open_urlresource() fails, HTTPException is another possible error
........


Modified:
python/branches/py3k/ (props changed)
python/branches/py3k/Lib/test/test_multibytecodec_support.py
python/branches/py3k/Lib/test/test_normalization.py

Modified: python/branches/py3k/Lib/test/test_multibytecodec_support.py
==============================================================================
--- python/branches/py3k/Lib/test/test_multibytecodec_support.py (original)
+++ python/branches/py3k/Lib/test/test_multibytecodec_support.py Thu Nov 26 13:38:23 2009
@@ -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 @@
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):

Modified: python/branches/py3k/Lib/test/test_normalization.py
==============================================================================
--- python/branches/py3k/Lib/test/test_normalization.py (original)
+++ python/branches/py3k/Lib/test/test_normalization.py Thu Nov 26 13:38:23 2009
@@ -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 @@
# 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:
_______________________________________________
Python-checkins mailing list
Python-checkins [at] python
http://mail.python.org/mailman/listinfo/python-checkins

Python checkins RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.