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

Add failing test for installing from git refs

This commit is contained in:
Dustin Ingram 2017-04-06 18:47:01 -04:00
parent 4ee868553c
commit 0eb8033808
No known key found for this signature in database
GPG key ID: 93D2B8D4930A5E39

View file

@ -103,6 +103,27 @@ def test_git_with_tag_name_as_revision(script):
assert '0.1' in version.stdout
@pytest.mark.network
def test_git_with_ref_as_revision(script):
"""
Git backend should be able to install from a ref
"""
version_pkg_path = _create_test_package(script)
script.run(
'git', 'update-ref', 'refs/foo/bar', 'HEAD',
expect_stderr=True,
cwd=version_pkg_path,
)
_change_test_package_version(script, version_pkg_path)
script.pip(
'install', '-e', '%s@refs/foo/bar#egg=version_pkg' %
('git+file://' + version_pkg_path.abspath.replace('\\', '/')),
expect_stderr=True
)
version = script.run('version_pkg')
assert '0.1' in version.stdout
@pytest.mark.network
def test_git_with_tag_name_and_update(script, tmpdir):
"""