Skip to content

Commit 83f91e6

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 4b230d1 commit 83f91e6

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

tests/check_merge_conflict_test.py

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -113,15 +113,16 @@ def test_merge_conflicts_git(capsys):
113113
# Individual markers are not actually merge conflicts, need 3 markers
114114
# to mark a real conflict
115115
'contents, expected_retcode',
116-
((b'<<<<<<< ', 0),
117-
(b'=======', 0),
118-
(b'>>>>>>> ',0),
119-
# Real conflict marker
120-
(b'<<<<<<< HEAD\n=======\n>>>>>>> branch\n', 1),
121-
# Allow for the possibility of an .rst file with a =======
122-
# inside a conflict marker
123-
(b'<<<<<<< HEAD\n=======\n=======\n>>>>>>> branch\n', 1),
124-
)
116+
(
117+
(b'<<<<<<< ', 0),
118+
(b'=======', 0),
119+
(b'>>>>>>> ', 0),
120+
# Real conflict marker
121+
(b'<<<<<<< HEAD\n=======\n>>>>>>> branch\n', 1),
122+
# Allow for the possibility of an .rst file with a =======
123+
# inside a conflict marker
124+
(b'<<<<<<< HEAD\n=======\n=======\n>>>>>>> branch\n', 1),
125+
),
125126
)
126127
def test_merge_conflicts_with_rst(contents, expected_retcode, repository_pending_merge):
127128
repository_pending_merge.join('f2.rst').write_binary(contents)
@@ -147,14 +148,15 @@ def test_does_not_care_when_not_in_a_merge(tmpdir):
147148
f.write_binary(b'problem\n=======\n')
148149
assert main([str(f.realpath())]) == 0
149150

151+
150152
@pytest.mark.parametrize(
151153
'contents, expected_retcode',
152154
(
153155
# Not a complete conflict marker
154156
(b'=======', 0),
155157
# Complete conflict marker
156158
(b'<<<<<<< HEAD\nproblem\n=======\n>>>>>>> branch\n', 1),
157-
)
159+
),
158160
)
159161
def test_care_when_assumed_merge(contents, expected_retcode, tmpdir):
160162
f = tmpdir.join('README.md')

0 commit comments

Comments
 (0)