mirror of https://github.com/pypa/pip
Assert that repo_url_path doesn't exist.
This commit is contained in:
parent
144051e422
commit
1ca61e14ba
|
@ -276,12 +276,13 @@ def test_git_with_tag_name_and_update(script, tmpdir):
|
|||
Test cloning a git repository and updating to a different version.
|
||||
"""
|
||||
url_path = 'pypa/pip-test-package.git'
|
||||
local_url = _github_checkout(url_path, tmpdir, egg='pip-test-package')
|
||||
base_local_url = _github_checkout(url_path, tmpdir)
|
||||
|
||||
local_url = '{}#egg=pip-test-package'.format(base_local_url)
|
||||
result = script.pip('install', '-e', local_url)
|
||||
result.assert_installed('pip-test-package', with_files=['.git'])
|
||||
|
||||
new_local_url = _github_checkout(url_path, tmpdir)
|
||||
new_local_url += '@0.1.2#egg=pip-test-package'
|
||||
new_local_url = '{}@0.1.2#egg=pip-test-package'.format(base_local_url)
|
||||
result = script.pip(
|
||||
'install', '--global-option=--version', '-e', new_local_url,
|
||||
)
|
||||
|
|
|
@ -66,6 +66,7 @@ def local_checkout(
|
|||
else:
|
||||
repository_name = os.path.basename(remote_repo)
|
||||
repo_url_path = os.path.join(directory, repository_name)
|
||||
assert not os.path.exists(repo_url_path)
|
||||
vcs_backend = vcs.get_backend(vcs_name)
|
||||
vcs_backend.obtain(repo_url_path, url=hide_url(remote_repo))
|
||||
|
||||
|
|
Loading…
Reference in New Issue