diff options
author | Jim Fulton <distutils-sig@python.org> | 2007-03-09 15:56:51 +0000 |
---|---|---|
committer | Jim Fulton <distutils-sig@python.org> | 2007-03-09 15:56:51 +0000 |
commit | 89111e6143f3a9bb510433f529d4281681b7c66e (patch) | |
tree | 15b86e76d67a73b14db6d38a422bc9c4dcba408d /setuptools/tests/test_packageindex.py | |
parent | 08f3761c19825414ef0d33f584a667444ccb5523 (diff) | |
download | external_python_setuptools-89111e6143f3a9bb510433f529d4281681b7c66e.tar.gz external_python_setuptools-89111e6143f3a9bb510433f529d4281681b7c66e.tar.bz2 external_python_setuptools-89111e6143f3a9bb510433f529d4281681b7c66e.zip |
Changed setuptools.package_index.PackageIndex.open_url to include the
url in the exception.
--HG--
branch : setuptools-0.6
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4054241
Diffstat (limited to 'setuptools/tests/test_packageindex.py')
-rw-r--r-- | setuptools/tests/test_packageindex.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py new file mode 100644 index 00000000..a2ca36ad --- /dev/null +++ b/setuptools/tests/test_packageindex.py @@ -0,0 +1,19 @@ +"""Package Index Tests +""" +# More would be better! + +import os, shutil, tempfile, unittest +import pkg_resources +import setuptools.package_index + +class TestPackageIndex(unittest.TestCase): + + def test_bad_urls(self): + index = setuptools.package_index.PackageIndex() + url = 'http://127.0.0.1/nonesuch/test_package_index' + try: + index.open_url(url) + except Exception, v: + self.assert_(url in str(v)) + else: + self.assert_(False) |