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

Mailing List Archive: Python: Checkins

r76535 - in python/trunk/Lib/test: test_multibytecodec_support.py 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 (180 views)
Permalink
r76535 - in python/trunk/Lib/test: test_multibytecodec_support.py test_normalization.py

Author: antoine.pitrou
Date: Thu Nov 26 13:36:30 2009
New Revision: 76535

Log:
When open_urlresource() fails, HTTPException is another possible error



Modified:
python/trunk/Lib/test/test_multibytecodec_support.py
python/trunk/Lib/test/test_normalization.py

Modified: python/trunk/Lib/test/test_multibytecodec_support.py
==============================================================================
--- python/trunk/Lib/test/test_multibytecodec_support.py (original)
+++ python/trunk/Lib/test/test_multibytecodec_support.py Thu Nov 26 13:36:30 2009
@@ -6,6 +6,7 @@

import sys, codecs
import unittest, re
+from httplib import HTTPException
from test import test_support
from StringIO import StringIO

@@ -268,7 +269,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/trunk/Lib/test/test_normalization.py
==============================================================================
--- python/trunk/Lib/test/test_normalization.py (original)
+++ python/trunk/Lib/test/test_normalization.py Thu Nov 26 13:36:30 2009
@@ -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 @@
# 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:
_______________________________________________
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.