code
stringlengths
3
6.57k
enumerate(self.calls[:N])
This (expected)
This (actual)
len(self._calls_done)
len(self._calls_done)
git_cl.logging.error(extended_msg)
len(self._calls_done)
self._calls_done.append(top)
isinstance(result, Exception)
test_ask_for_explicit_yes_true(self)
self.assertTrue(git_cl.ask_for_explicit_yes('prompt')
test_LoadCodereviewSettingsFromFile_gerrit(self)
StringIO.StringIO('GERRIT_HOST: true')
self.assertIsNone(git_cl.LoadCodereviewSettingsFromFile(codereview_file)
_is_gerrit_calls(cls, gerrit=False)
_git_post_upload_calls(cls)
_git_sanity_checks(diff_base, working_branch, get_remote_branch=True)
miss (error code 1)
GetRemoteBranch()
cls._is_gerrit_calls(True)
str(issue)
SystemExitMock()
in ('override_squash', 'override_nosquash')
in ('squash', 'nosquash')
git_footers.get_footer_change_id(description)
callError(1)
metrics_arguments.append('wip')
metrics_arguments.append('notify=NONE')
metrics_arguments.append('m')
sorted(reviewers)
metrics_arguments.append('r')
metrics_arguments.append('cc')
TODO(crbug/877717)
sorted(reviewers)
in (reviewers + ['joe@example.com'] + cc)
sorted(reviewers)
metrics_arguments.append('r')
reviewers.remove(r)
sorted(['joe@example.com'] + cc)
metrics_arguments.append('cc')
cc.remove(c)
sorted((labels or {})
items()
metrics_arguments.append('l=%s+%d' % (k, v)
sorted(metrics_arguments)
TODO(crbug/877717)
sorted(reviewers)
cls._git_post_upload_calls()
self.mock(git_cl.sys, 'stdout', StringIO.StringIO()
self._mocked_call(['RunEditor'])
self.mock(os, 'remove', lambda _: True)
join(map(lambda x: '%2i: %s' % x, enumerate(self.calls)
git_cl.main(['upload'] + upload_args)
test_gerrit_upload_without_change_id(self)
test_gerrit_upload_without_change_id_override_nosquash(self)
test_gerrit_no_reviewer(self)
test_gerrit_no_reviewer_non_chromium_host(self)
TODO(crbug/877717)
test_gerrit_patchset_title_special_chars(self)
self.mock(git_cl.sys, 'stdout', StringIO.StringIO()
test_gerrit_reviewers_cmd_line(self)
test_gerrit_reviewer_multiple(self)
self._mocked_call('GetCodeReviewTbrScore', *a)
test_gerrit_upload_squash_first_is_default(self)
test_gerrit_upload_squash_first(self)
test_gerrit_upload_squash_first_with_labels(self)
test_gerrit_upload_squash_first_against_rev(self)
sys.stdout.getvalue()
test_gerrit_upload_squash_reupload(self)
test_gerrit_upload_squash_reupload_to_abandoned(self)
self._mocked_call('DieWithError', msg)
self.assertRaises(SystemExitMock)
test_gerrit_upload_squash_reupload_to_not_owned(self)
git_cl.sys.stdout.getvalue()
test_upload_branch_deps(self)
self.mock(git_cl.sys, 'stdout', StringIO.StringIO()
mock_run_git(*args, **_kwargs)
join(branch_deps)
self.mock(git_cl, 'RunGit', mock_run_git)
RecordCalls()
mock_CMDupload(*args, **_kwargs)
self.mock(git_cl, 'CMDupload', mock_CMDupload)
MockChangelist()
__init__(self)
GetBranch(self)
GetIssue(self)
GetPatchset(self)
IsGerrit(self)
git_cl.upload_branch_deps(MockChangelist()
self.assertEquals(5, record_calls.times_called)
self.assertEquals(0, ret)
test_gerrit_change_id(self)
git_cl.GenerateGerritChangeId('line1\nline2\n')
self.assertEqual(change_id, 'Ihashchange')
test_desecription_append_footer(self)
identification. ('foo', 'R=one', 'foo\n\nR=one')
git_cl.ChangeDescription(init_desc)
desc.append_footer(footer_line)
self.assertEqual(desc.description, expected_desc)
test_update_reviewers(self)