aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/tests/test_packageindex.py
diff options
context:
space:
mode:
authorTarek Ziade <tarek@ziade.org>2010-05-19 12:09:56 +0200
committerTarek Ziade <tarek@ziade.org>2010-05-19 12:09:56 +0200
commita33917aed3c98e2537386bd904658f0b4f963d1c (patch)
tree627de7b5a1d4234a808b453a78dc8399e1d70381 /setuptools/tests/test_packageindex.py
parent24773fa31a13fc0058aed577d566cb528a769061 (diff)
downloadexternal_python_setuptools-a33917aed3c98e2537386bd904658f0b4f963d1c.tar.gz
external_python_setuptools-a33917aed3c98e2537386bd904658f0b4f963d1c.tar.bz2
external_python_setuptools-a33917aed3c98e2537386bd904658f0b4f963d1c.zip
malformed urls in 2.7 are catched now - fixes #160
--HG-- branch : distribute extra : rebase_source : de334e49e876c8ea88f738e03995a461ea669879
Diffstat (limited to 'setuptools/tests/test_packageindex.py')
-rw-r--r--setuptools/tests/test_packageindex.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py
index 29359a9c..8ae7a5b9 100644
--- a/setuptools/tests/test_packageindex.py
+++ b/setuptools/tests/test_packageindex.py
@@ -1,7 +1,7 @@
"""Package Index Tests
"""
# More would be better!
-
+import sys
import os, shutil, tempfile, unittest, urllib2
import pkg_resources
import setuptools.package_index
@@ -57,6 +57,16 @@ class TestPackageIndex(unittest.TestCase):
except Exception, v:
self.assert_('nonnumeric port' in str(v))
+
+ # issue #160
+ if sys.version_info[0] == 2 and sys.version_info[1] == 7:
+ # this should not fail
+ url = 'http://example.com'
+ page = ('<a href="http://www.famfamfam.com]('
+ 'http://www.famfamfam.com/">')
+ index.process_index(url, page)
+
+
def test_url_ok(self):
index = setuptools.package_index.PackageIndex(
hosts=('www.example.com',)