mirror of
https://github.com/pypa/pip
synced 2023-12-13 21:30:23 +01:00
Add failing test for short-SHA refs
This commit is contained in:
parent
ecc1072ba0
commit
9c97937e74
|
@ -115,6 +115,27 @@ def test_git_with_sha1_revisions(script):
|
|||
assert '0.1' in version.stdout, version.stdout
|
||||
|
||||
|
||||
@pytest.mark.network
|
||||
def test_git_with_short_sha1_revisions(script):
|
||||
"""
|
||||
Git backend should be able to install from SHA1 revisions
|
||||
"""
|
||||
version_pkg_path = _create_test_package(script)
|
||||
_change_test_package_version(script, version_pkg_path)
|
||||
sha1 = script.run(
|
||||
'git', 'rev-parse', 'HEAD~1',
|
||||
cwd=version_pkg_path,
|
||||
).stdout.strip()[:7]
|
||||
script.pip(
|
||||
'install', '-e',
|
||||
'%s@%s#egg=version_pkg' %
|
||||
('git+file://' + version_pkg_path.abspath.replace('\\', '/'), sha1),
|
||||
expect_stderr=True
|
||||
)
|
||||
version = script.run('version_pkg')
|
||||
assert '0.1' in version.stdout, version.stdout
|
||||
|
||||
|
||||
@pytest.mark.network
|
||||
def test_git_with_branch_name_as_revision(script):
|
||||
"""
|
||||
|
|
Loading…
Reference in a new issue