mirror of
https://github.com/pypa/pip
synced 2023-12-13 21:30:23 +01:00
test requirements pass (fixed the wildcard match, lib/python ->
env/lib/python)
This commit is contained in:
parent
cf1077371e
commit
9cce7145e4
|
@ -1,23 +1,23 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import textwrap
|
import textwrap
|
||||||
from test_pip import base_path, reset_env, run_pip, pyversion, lib_py, write_file
|
from test_pip import reset_env, run_pip, write_file
|
||||||
|
|
||||||
def test_requirements_file():
|
def test_requirements_file():
|
||||||
"""
|
"""
|
||||||
Test installing from a requirements file.
|
Test installing from a requirements file.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
reset_env()
|
env = reset_env()
|
||||||
write_file('initools-req.txt', textwrap.dedent("""\
|
write_file('initools-req.txt', textwrap.dedent("""\
|
||||||
INITools==0.2
|
INITools==0.2
|
||||||
# and something else to test out:
|
# and something else to test out:
|
||||||
simplejson<=1.7.4
|
simplejson<=1.7.4
|
||||||
"""))
|
"""))
|
||||||
result = run_pip('install', '-r', 'initools-req.txt')
|
result = run_pip('install', '-r', env.base_path / 'initools-req.txt')
|
||||||
assert len(result.wildcard_matches('lib/python*/site-packages/INITools-0.2-py*.egg-info')) == 1
|
assert len(result.wildcard_matches('env/lib/python*/site-packages/INITools-0.2-py*.egg-info')) == 1
|
||||||
assert len(result.wildcard_matches('lib/python*/site-packages/initools')) == 1
|
assert len(result.wildcard_matches('env/lib/python*/site-packages/initools')) == 1
|
||||||
dirs = result.wildcard_matches('lib/python*/site-packages/simplejson*')
|
dirs = result.wildcard_matches('env/lib/python*/site-packages/simplejson*')
|
||||||
assert len(dirs) == 2
|
assert len(dirs) == 2
|
||||||
assert dirs[0].dir, dirs[1].dir == (True, True)
|
assert dirs[0].dir, dirs[1].dir == (True, True)
|
||||||
|
|
||||||
|
@ -26,14 +26,14 @@ def test_multiple_requirements_files():
|
||||||
Test installing from multiple nested requirements files.
|
Test installing from multiple nested requirements files.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
reset_env()
|
env = reset_env()
|
||||||
write_file('initools-req.txt', textwrap.dedent("""\
|
write_file('initools-req.txt', textwrap.dedent("""\
|
||||||
-e svn+http://svn.colorstudy.com/INITools/trunk@3139#egg=INITools-dev
|
-e svn+http://svn.colorstudy.com/INITools/trunk@3139#egg=INITools-dev
|
||||||
-r simplejson-req.txt"""))
|
-r simplejson-req.txt"""))
|
||||||
write_file('simplejson-req.txt', textwrap.dedent("""\
|
write_file('simplejson-req.txt', textwrap.dedent("""\
|
||||||
simplejson<=1.7.4
|
simplejson<=1.7.4
|
||||||
"""))
|
"""))
|
||||||
result = run_pip('install', '-r', 'initools-req.txt')
|
result = run_pip('install', '-r', env.base_path / 'initools-req.txt')
|
||||||
assert len(result.wildcard_matches('lib/python*/site-packages/simplejson*')) == 2
|
assert len(result.wildcard_matches('env/lib/python*/site-packages/simplejson*')) == 2
|
||||||
assert 'src/initools' in result.files_created
|
assert 'env/src/initools' in result.files_created
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue