summaryrefslogtreecommitdiff
path: root/test/test_commit.py
diff options
context:
space:
mode:
authorSebastian Thiel <sebastian.thiel@icloud.com>2022-08-25 09:42:50 +0800
committerSebastian Thiel <sebastian.thiel@icloud.com>2022-08-25 09:42:50 +0800
commit73bde1f27711e48bd887b5a13cd5e3a0a8d9d723 (patch)
treec2379ccfe94deec08d37ebe2e9a0ba6ab3a75e49 /test/test_commit.py
parent12d91c6459422c034b790c8bcc5e429aa3a42c3b (diff)
parent72cf71cb3e9d0458dc27158ecb67d8dd4f26af04 (diff)
downloadgitpython-73bde1f27711e48bd887b5a13cd5e3a0a8d9d723.tar.gz
Merge branch 'add-co-authors'
Diffstat (limited to 'test/test_commit.py')
-rw-r--r--test/test_commit.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/test_commit.py b/test/test_commit.py
index 82126987..c5a43c94 100644
--- a/test/test_commit.py
+++ b/test/test_commit.py
@@ -509,3 +509,18 @@ JzJMZDRLQLFvnzqZuCjE
assert KEY_1 not in commit.trailers.keys()
assert KEY_2 in commit.trailers.keys()
assert commit.trailers[KEY_2] == VALUE_2
+
+ def test_commit_co_authors(self):
+ commit = copy.copy(self.rorepo.commit("4251bd5"))
+ commit.message = """Commit message
+
+Co-authored-by: Test User 1 <602352+test@users.noreply.github.com>
+Co-authored-by: test_user_2 <another_user-email@github.com>
+Co_authored_by: test_user_x <test@github.com>
+Co-authored-by: test_user_y <test@github.com> text
+Co-authored-by: test_user_3 <test_user_3@github.com>"""
+ assert commit.co_authors == [
+ Actor("Test User 1", "602352+test@users.noreply.github.com"),
+ Actor("test_user_2", "another_user-email@github.com"),
+ Actor("test_user_3", "test_user_3@github.com"),
+ ]