提交 461b6496 编写于 作者: F Francesco
上级 9cce7145
......@@ -2,8 +2,8 @@
import zipfile
import textwrap
from os.path import abspath, join, dirname, pardir
from test_pip import here, reset_env, run_pip, pyversion
from test_pip import write_file
from test_pip import here, reset_env, run_pip, write_file
from path import Path
def test_create_bundle():
"""
......@@ -20,9 +20,9 @@ def test_create_bundle():
-e svn+http://svn.colorstudy.com/INITools/trunk#egg=initools-dev
pip''' % fspkg)
write_file('bundle-req.txt', pkg_lines)
# Create a bundle in env.base_path/ test.pybundle
result = run_pip('bundle', '-r', env.base_path/ 'bundle-req.txt', env.base_path/ 'test.pybundle')
bundle = result.files_after.get('test.pybundle', None)
# Create a bundle in env.scratch_path/ test.pybundle
result = run_pip('bundle', '-r', env.scratch_path/ 'bundle-req.txt', env.scratch_path/ 'test.pybundle')
bundle = result.files_after.get(join('scratch', 'test.pybundle'), None)
assert bundle is not None
files = zipfile.ZipFile(bundle.full).namelist()
......
......@@ -22,6 +22,6 @@ def test_single_download_from_requirements_file():
write_file('test-req.txt', textwrap.dedent("""
INITools==0.1
"""))
result = run_pip('install', '-r', env.base_path/ 'test-req.txt', '-d', '.', expect_error=True)
result = run_pip('install', '-r', env.scratch_path/ 'test-req.txt', '-d', '.', expect_error=True)
assert Path('scratch')/ 'INITools-0.1.tar.gz' in result.files_created
assert env.site_packages/ 'initools' not in result.files_created
......@@ -14,7 +14,7 @@ def test_requirements_file():
# and something else to test out:
simplejson<=1.7.4
"""))
result = run_pip('install', '-r', env.base_path / 'initools-req.txt')
result = run_pip('install', '-r', env.scratch_path / 'initools-req.txt')
assert len(result.wildcard_matches('env/lib/python*/site-packages/INITools-0.2-py*.egg-info')) == 1
assert len(result.wildcard_matches('env/lib/python*/site-packages/initools')) == 1
dirs = result.wildcard_matches('env/lib/python*/site-packages/simplejson*')
......@@ -33,7 +33,7 @@ def test_multiple_requirements_files():
write_file('simplejson-req.txt', textwrap.dedent("""\
simplejson<=1.7.4
"""))
result = run_pip('install', '-r', env.base_path / 'initools-req.txt')
result = run_pip('install', '-r', env.scratch_path / 'initools-req.txt')
assert len(result.wildcard_matches('env/lib/python*/site-packages/simplejson*')) == 2
assert 'env/src/initools' in result.files_created
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册