mirror of
https://github.com/pypa/pip
synced 2023-12-13 21:30:23 +01:00
Test installing after updating the remote repository.
This commit is contained in:
parent
86e936931f
commit
b65dfd2686
1 changed files with 32 additions and 0 deletions
|
@ -6,6 +6,38 @@ from tests.lib import (
|
|||
from tests.lib.local_repos import local_checkout
|
||||
|
||||
|
||||
def _install_version_pkg(script, path):
|
||||
"""
|
||||
Install the version_pkg package, and return the version installed.
|
||||
|
||||
Args:
|
||||
path: a tests.lib.path.Path object pointing to a Git repository
|
||||
containing the package.
|
||||
"""
|
||||
abs_path = path.abspath.replace('\\', '/')
|
||||
project_url = 'git+file://{}@master#egg=version_pkg'.format(abs_path)
|
||||
script.pip('install', '-e', project_url)
|
||||
result = script.run('version_pkg')
|
||||
version = result.stdout.strip()
|
||||
|
||||
return version
|
||||
|
||||
|
||||
@pytest.mark.network
|
||||
def test_git_install_branch_again_after_branch_changes(script):
|
||||
"""
|
||||
Test installing a branch again after the branch is updated in the remote
|
||||
repository.
|
||||
"""
|
||||
version_pkg_path = _create_test_package(script)
|
||||
version = _install_version_pkg(script, version_pkg_path)
|
||||
assert version == '0.1'
|
||||
|
||||
_change_test_package_version(script, version_pkg_path)
|
||||
version = _install_version_pkg(script, version_pkg_path)
|
||||
assert version == 'some different version'
|
||||
|
||||
|
||||
@pytest.mark.network
|
||||
def test_install_editable_from_git_with_https(script, tmpdir):
|
||||
"""
|
||||
|
|
Loading…
Reference in a new issue