chore: fix failing tests in setup_git_home function

This commit is contained in:
Paul Gauthier (aider) 2024-08-28 11:19:30 -07:00
parent e551159937
commit 2192a5efb2
2 changed files with 3 additions and 3 deletions

View file

@ -58,13 +58,13 @@ def setup_git_home(io):
# Assume it's a new project name
project_name = choice
new_dir = home / project_name
new_dir.mkdir(exist_ok=True)
new_dir.mkdir(parents=True, exist_ok=True)
os.chdir(new_dir)
return str(new_dir)
project_name = io.user_input("Enter a name for your new project directory:")
new_dir = home / project_name
new_dir.mkdir(exist_ok=True)
new_dir.mkdir(parents=True, exist_ok=True)
os.chdir(new_dir)
return str(new_dir)

View file

@ -88,7 +88,7 @@ class TestMain(TestCase):
result = setup_git_home(mock_io.return_value)
mock_io.return_value.tool_output.assert_called_with(
mock_io.return_value.tool_output.assert_any_call(
"Found git repositories in your home directory:"
)
mock_io.return_value.prompt_ask.assert_called_once()