Skip to content

Commit 3cb7ecf

Browse files
committed
Add malformed co-authors to the test, to check they aren't detected with the regex.
1 parent 146cbda commit 3cb7ecf

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/test_commit.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -515,8 +515,12 @@ def test_commit_co_authors(self):
515515
commit.message = """Commit message
516516
517517
Co-authored-by: Test User 1 <602352+test@users.noreply.github.com>
518-
Co-authored-by: test_user_2 <another_user-email@.github.com>"""
518+
Co-authored-by: test_user_2 <another_user-email@github.com>
519+
Co_authored_by: test_user_x <test@github.com>
520+
Co-authored-by: test_user_y <poorly formatted email @github.com>
521+
Co-authored-by: test_user_3 <test_user_3@github.com>"""
519522
assert commit.co_authors == [
520523
Actor("Test User 1", "602352+test@users.noreply.github.com"),
521-
Actor("test_user_2", "another_user-email@.github.com"),
524+
Actor("test_user_2", "another_user-email@github.com"),
525+
Actor("test_user_3", "test_user_3@github.com"),
522526
]

0 commit comments

Comments
 (0)