Commit c0cb2ebf authored by Jason R. Coombs's avatar Jason R. Coombs

Merge

--HG--
branch : distribute
extra : rebase_source : 38f3eb8b52e65c02ab80e32b69bbf0f6ae8f9250
parents 5132e62a adc4fbb1
......@@ -4,6 +4,8 @@ import sys
import unittest
import urllib2
import pkg_resources
import httplib
import distutils.errors
import setuptools.package_index
from server import IndexServer
......@@ -66,8 +68,12 @@ class TestPackageIndex(unittest.TestCase):
url = 'http://http://svn.pythonpaste.org/Paste/wphp/trunk'
try:
index.open_url(url)
except Exception, v:
self.assert_('nonnumeric port' in str(v))
except distutils.errors.DistutilsError, error:
# Python 2.7.3
self.assert_('getaddrinfo failed' in str(error))
except httplib.InvalidURL, error:
# Python 2.7.2 and earlier
self.assert_('nonnumeric port' in str(error))
def test_bad_url_screwy_href(self):
index = setuptools.package_index.PackageIndex(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment