1
1
Fork 0
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:
Dustin Ingram 2018-04-03 14:32:48 -05:00
parent ecc1072ba0
commit 9c97937e74
No known key found for this signature in database
GPG key ID: 93D2B8D4930A5E39

View file

@ -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):
"""