mirror of https://github.com/pypa/pip
Fix test after rebasing another time.
This commit is contained in:
parent
2a30db5994
commit
28061a71c5
|
@ -136,7 +136,7 @@ class Git(VersionControl):
|
|||
# the form of a Git commit hash.
|
||||
if not looks_like_hash(rev):
|
||||
logger.warning(
|
||||
"Did not find branch or tag '%s', assuming revision or ref",
|
||||
"Did not find branch or tag '%s', assuming revision or ref.",
|
||||
rev,
|
||||
)
|
||||
return rev_options
|
||||
|
|
|
@ -49,9 +49,9 @@ def test_check_rev_options_ref_not_found(get_sha_mock):
|
|||
assert new_options.rev == 'develop'
|
||||
|
||||
|
||||
@patch('pip._internal.vcs.git.Git.get_short_refs')
|
||||
def test_check_rev_options_not_found_warning(get_refs_mock, caplog):
|
||||
get_refs_mock.return_value = {}
|
||||
@patch('pip._internal.vcs.git.Git.get_revision_sha')
|
||||
def test_check_rev_options_not_found_warning(get_sha_mock, caplog):
|
||||
get_sha_mock.return_value = None
|
||||
git = Git()
|
||||
|
||||
sha = 40 * 'a'
|
||||
|
@ -67,7 +67,7 @@ def test_check_rev_options_not_found_warning(get_refs_mock, caplog):
|
|||
messages = [r.getMessage() for r in caplog.records]
|
||||
messages = [msg for msg in messages if msg.startswith('Did not find ')]
|
||||
assert messages == [
|
||||
"Did not find branch or tag 'aaaaaa', assuming ref or revision."
|
||||
"Did not find branch or tag 'aaaaaa', assuming revision or ref."
|
||||
]
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue