From 6eaf75f760000c5b010b334d7f7c32fa8380ced0 Mon Sep 17 00:00:00 2001 From: Kyosuke Takayama Date: Sun, 1 Jun 2025 19:29:17 +0900 Subject: [PATCH] test: add test for commit-language option --- tests/basic/test_main.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/basic/test_main.py b/tests/basic/test_main.py index ebdc4d450..1725360ad 100644 --- a/tests/basic/test_main.py +++ b/tests/basic/test_main.py @@ -1035,6 +1035,16 @@ class TestMain(TestCase): system_info = coder.get_platform_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") 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")