Test installing after updating the remote repository.
@@ -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):
"""
