11 def test_check_commit_with_valid_title(self):
17 [
"ffffffff:devil@ircad.fr:fix(reactor): Prevent uncontrolled nuclear fusion. See #666"])
20 [
"ffffffff:devil@ircad.fr:chore(*): apply latest sheldon"])
23 [
"ffffffff:devil@ircad.fr:refactor(plugin_config.cmake): generate at build instead at configure"])
26 self.assertFalse(any(result),
"A valid commit has been detected as invalid.")
28 def test_check_commit_with_invalid_title(self):
34 [
"ffffffff:devil@ircad.fr:It's the party at the village"])
37 self.assertTrue(any(result),
"An invalid commit has not been detected as invalid")
39 def test_check_commit_with_valid_author(self):
45 [
"ffffffff:god@ircad.fr:fix(reactor): Prevent uncontrolled nuclear fusion. See #666"])
48 self.assertFalse(any(result),
"A valid commit has been detected as invalid.")
50 def test_check_commit_with_invalid_author(self):
56 [
"ffffffff:anonymous@nowhere.com:fix(reactor): Prevent uncontrolled nuclear fusion. See #666"])
59 self.assertTrue(any(result),
"An invalid commit has not been detected as invalid")
62 if __name__ ==
'__main__':
def check_commit_messages(commit_messages)