Exemplo n.º 1
0
 def test_local_index(self, tmpdir):
     """
     local_open should be able to read an index from the file system.
     """
     index_file = tmpdir / 'index.html'
     with index_file.open('w') as f:
         f.write('<div>content</div>')
     url = 'file:' + pathname2url(str(tmpdir)) + '/'
     res = setuptools.package_index.local_open(url)
     assert 'content' in res.read()
Exemplo n.º 2
0
 def test_local_index(self, tmpdir):
     """
     local_open should be able to read an index from the file system.
     """
     index_file = tmpdir / 'index.html'
     with index_file.open('w') as f:
         f.write('<div>content</div>')
     url = 'file:' + pathname2url(str(tmpdir)) + '/'
     res = setuptools.package_index.local_open(url)
     assert 'content' in res.read()
 def test_local_index(self, tmpdir):
     """
     local_open should be able to read an index from the file system.
     """
     index_file = tmpdir / "index.html"
     with index_file.open("w") as f:
         f.write("<div>content</div>")
     url = "file:" + pathname2url(str(tmpdir)) + "/"
     res = setuptools.package_index.local_open(url)
     assert "content" in res.read()
Exemplo n.º 4
0
 def test_local_index(self):
     """
     local_open should be able to read an index from the file system.
     """
     f = open('index.html', 'w')
     f.write('<div>content</div>')
     f.close()
     try:
         url = 'file:' + pathname2url(os.getcwd()) + '/'
         res = setuptools.package_index.local_open(url)
     finally:
         os.remove('index.html')
     assert 'content' in res.read()
Exemplo n.º 5
0
 def test_local_index(self):
     """
     local_open should be able to read an index from the file system.
     """
     f = open('index.html', 'w')
     f.write('<div>content</div>')
     f.close()
     try:
         url = 'file:' + pathname2url(os.getcwd()) + '/'
         res = setuptools.package_index.local_open(url)
     finally:
         os.remove('index.html')
     assert 'content' in res.read()