Skip to content

Commit 0955086

Browse files
committed
tests/core.py: test for commit_message match
Signed-off-by: Trevor Gamblin <[email protected]>
1 parent cc79d72 commit 0955086

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/patchtest2/tests/core.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ def test_mbox_commit_message_presence(target):
111111

112112
# Check to see if there is content before the signoff
113113
match = patterns.endcommit_messages_regex.search(target.commit_message)
114-
if not target.commit_message[: match.start()]:
115-
result = "FAIL"
114+
if match is not None:
115+
if not target.commit_message[:match.start()]:
116+
result = "FAIL"
116117

117118
return PatchtestResult(target.subject, test_name, result, reason)

0 commit comments

Comments
 (0)