1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00

added tests to git backend: it should be able to install from branch and tag names. issue #95 seems to be invalid

This commit is contained in:
Hugo Lopes Tavares 2010-08-05 11:35:05 -03:00
parent 425bfafbb6
commit 2c5c6f4b2c

View file

@ -14,3 +14,28 @@ def test_git_with_sha1_revisions():
version = env.run('version_pkg')
assert '0.1' in version.stdout, version.stdout
def test_git_with_branch_name_as_revision():
"""
Git backend should be able to install from branch names
"""
env = reset_env()
version_pkg_path = _create_test_package(env)
env.run('git', 'checkout', '-b', 'test_branch', expect_stderr=True, cwd=version_pkg_path)
_change_test_package_version(env, version_pkg_path)
run_pip('install', '-e', '%s@test_branch#egg=version_pkg' % ('git+file://' + version_pkg_path))
version = env.run('version_pkg')
assert 'some different version' in version.stdout
def test_git_with_tag_name_as_revision():
"""
Git backend should be able to install from tag names
"""
env = reset_env()
version_pkg_path = _create_test_package(env)
env.run('git', 'tag', 'test_tag', expect_stderr=True, cwd=version_pkg_path)
_change_test_package_version(env, version_pkg_path)
run_pip('install', '-e', '%s@test_tag#egg=version_pkg' % ('git+file://' + version_pkg_path))
version = env.run('version_pkg')
assert '0.1' in version.stdout