mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-06 20:54:59 +00:00
test: add test for commit-language option
This commit is contained in:
parent
91f34e37f7
commit
6eaf75f760
1 changed files with 10 additions and 0 deletions
|
@ -1035,6 +1035,16 @@ class TestMain(TestCase):
|
||||||
system_info = coder.get_platform_info()
|
system_info = coder.get_platform_info()
|
||||||
self.assertIn("Spanish", system_info)
|
self.assertIn("Spanish", system_info)
|
||||||
|
|
||||||
|
def test_commit_language_japanese(self):
|
||||||
|
with GitTemporaryDirectory():
|
||||||
|
coder = main(
|
||||||
|
["--commit-language", "japanese", "--exit", "--yes"],
|
||||||
|
input=DummyInput(),
|
||||||
|
output=DummyOutput(),
|
||||||
|
return_coder=True,
|
||||||
|
)
|
||||||
|
self.assertIn("japanese", coder.commit_language)
|
||||||
|
|
||||||
@patch("git.Repo.init")
|
@patch("git.Repo.init")
|
||||||
def test_main_exit_with_git_command_not_found(self, mock_git_init):
|
def test_main_exit_with_git_command_not_found(self, mock_git_init):
|
||||||
mock_git_init.side_effect = git.exc.GitCommandNotFound("git", "Command 'git' not found")
|
mock_git_init.side_effect = git.exc.GitCommandNotFound("git", "Command 'git' not found")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue