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

Adding test capturing #116

parent 35d9509c
......@@ -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):
......
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