Skip to content

Commit

Permalink
Fix linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Gorin authored and aschmolck committed Mar 1, 2019
1 parent 97ef9dc commit 1560707
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion marge/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def regexp(str_regex):
"built-in rebase functionality, via their API. Note that Marge can't add\n"
"information in the commits in this case.\n"
),
),
)
parser.add_argument(
'--add-tested',
action='store_true',
Expand Down
6 changes: 4 additions & 2 deletions tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,17 +150,19 @@ def test_add_reviewers():
assert bot.config.merge_opts != job.MergeJobOptions.default()
assert bot.config.merge_opts == job.MergeJobOptions.default(add_reviewers=True)


def test_rebase_remotely_option_conflicts():
for conflicting_flag in ['--use-merge-strategy', '--add-tested', '--add-part-of', '--add-reviewers']:
with env(MARGE_AUTH_TOKEN="NON-ADMIN-TOKEN", MARGE_SSH_KEY="KEY", MARGE_GITLAB_URL='http://foo.com'):
with pytest.raises(app.MargeBotCliArgError):
with main('--rebase-remotely %s' % conflicting_flag) as bot:
with main('--rebase-remotely %s' % conflicting_flag):
pass


def test_impersonate_approvers():
with env(MARGE_AUTH_TOKEN="NON-ADMIN-TOKEN", MARGE_SSH_KEY="KEY", MARGE_GITLAB_URL='http://foo.com'):
with pytest.raises(AssertionError):
with main('--impersonate-approvers') as bot:
with main('--impersonate-approvers'):
pass

with env(MARGE_AUTH_TOKEN="ADMIN-TOKEN", MARGE_SSH_KEY="KEY", MARGE_GITLAB_URL='http://foo.com'):
Expand Down

0 comments on commit 1560707

Please sign in to comment.