From b4e390d71309258400be7fdab9759a1f9729cdda Mon Sep 17 00:00:00 2001 From: Russell Martin Date: Thu, 4 Jul 2024 11:22:03 -0400 Subject: [PATCH] Ensure consistent spacing for prompts for New Project wizard --- changes/1896.bugfix.rst | 1 + src/briefcase/commands/new.py | 2 +- tests/commands/new/test_select_option.py | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 changes/1896.bugfix.rst diff --git a/changes/1896.bugfix.rst b/changes/1896.bugfix.rst new file mode 100644 index 000000000..2cfb64cab --- /dev/null +++ b/changes/1896.bugfix.rst @@ -0,0 +1 @@ +The spacing after the New Project wizard prompts are now consistent. diff --git a/src/briefcase/commands/new.py b/src/briefcase/commands/new.py index 4e4997855..48da0da5b 100644 --- a/src/briefcase/commands/new.py +++ b/src/briefcase/commands/new.py @@ -417,7 +417,7 @@ def select_option( self.prompt_intro(intro=intro) return _select_option( - prompt=f"{variable} [{default}]:", + prompt=f"{variable} [{default}]: ", input=self.input, default=default, options=list(zip(options, options)), diff --git a/tests/commands/new/test_select_option.py b/tests/commands/new/test_select_option.py index db07ba0a2..fc2f5b03f 100644 --- a/tests/commands/new/test_select_option.py +++ b/tests/commands/new/test_select_option.py @@ -42,7 +42,7 @@ def test_override_validation(new_command, mock_select_option, capsys): in capsys.readouterr().out ) mock_select_option.assert_called_once_with( - prompt="Variable [1]:", + prompt="Variable [1]: ", input=new_command.input, default="1", options=[ @@ -63,7 +63,7 @@ def test_default_value_has_correct_index(new_command, mock_select_option): override_value=None, ) mock_select_option.assert_called_once_with( - prompt="Variable [2]:", + prompt="Variable [2]: ", input=new_command.input, default="2", options=[ @@ -84,7 +84,7 @@ def test_default_default_is_one(new_command, mock_select_option): override_value=None, ) mock_select_option.assert_called_once_with( - prompt="Variable [1]:", + prompt="Variable [1]: ", input=new_command.input, default="1", options=[