Пример #1
0
 def test_generate_commit_message_template_hook(self):
     msgeditor.hooks.install_named_hook(
         "commit_message_template",
         lambda commit_obj, msg: "save me some typing\n", None)
     commit_obj = commit.Commit()
     self.assertEqual(
         "save me some typing\n",
         msgeditor.generate_commit_message_template(commit_obj))
Пример #2
0
 def test_generate_commit_message_template_hook(self):
     msgeditor.hooks.install_named_hook(
         "commit_message_template", lambda commit_obj, msg: "save me some typing\n", None
     )
     commit_obj = commit.Commit()
     self.assertEquals("save me some typing\n", msgeditor.generate_commit_message_template(commit_obj))
Пример #3
0
 def test_generate_commit_message_template_no_hooks(self):
     commit_obj = commit.Commit()
     self.assertIs(None,
                   msgeditor.generate_commit_message_template(commit_obj))
Пример #4
0
 def test_generate_commit_message_template_no_hooks(self):
     commit_obj = commit.Commit()
     self.assertIs(None, msgeditor.generate_commit_message_template(commit_obj))