aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2013-12-01 06:05:38 -0500
committerJason R. Coombs <jaraco@jaraco.com>2013-12-01 06:05:38 -0500
commita87729f8b64b95cc203ae8e71fc6b5150725e1e7 (patch)
treef2e6f5d1c86e93291deb6ad25292a5aa57b24f4c
parent35d9509cd23b7830c91398fa5b3f2ffe6ffe7403 (diff)
downloadexternal_python_setuptools-a87729f8b64b95cc203ae8e71fc6b5150725e1e7.tar.gz
external_python_setuptools-a87729f8b64b95cc203ae8e71fc6b5150725e1e7.tar.bz2
external_python_setuptools-a87729f8b64b95cc203ae8e71fc6b5150725e1e7.zip
Adding test capturing #116
-rw-r--r--setuptools/tests/test_packageindex.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/setuptools/tests/test_packageindex.py b/setuptools/tests/test_packageindex.py
index 08969b7e..5a0c3946 100644
--- a/setuptools/tests/test_packageindex.py
+++ b/setuptools/tests/test_packageindex.py
@@ -151,6 +151,20 @@ class TestPackageIndex(unittest.TestCase):
self.assertEqual(url, 'https://example.com/bar')
self.assertEqual(rev, '2995')
+ def test_local_index(self):
+ f = open('index.html', 'w')
+ f.write('<div>content</div>')
+ f.close()
+ try:
+ import urllib.request
+ import os
+ url = 'file:' + urllib.request.pathname2url(os.getcwd()) + '/'
+ res = setuptools.package_index.local_open(url)
+ finally:
+ os.remove('index.html')
+ assert 'content' in res.read()
+
+
class TestContentCheckers(unittest.TestCase):
def test_md5(self):