@@ -3670,7 +3670,7 @@ def test_custom_completekey_ctrl_k():
36703670 assert found , "Could not find binding for 'c-k' (Keys.ControlK) in session key bindings"
36713671
36723672
3673- def test_init_main_session_exception (monkeypatch ):
3673+ def test_create_main_session_exception (monkeypatch ):
36743674
36753675 # Mock PromptSession to raise ValueError on first call, then succeed
36763676 valid_session_mock = mock .MagicMock (spec = PromptSession )
@@ -3758,7 +3758,7 @@ def test_multiline_complete_statement_keyboard_interrupt(multiline_app, monkeypa
37583758 poutput_mock .assert_called_with ('^C' )
37593759
37603760
3761- def test_init_main_session_no_console_error (monkeypatch ):
3761+ def test_create_main_session_no_console_error (monkeypatch ):
37623762 from cmd2 .cmd2 import NoConsoleScreenBufferError
37633763
37643764 # Mock PromptSession to raise NoConsoleScreenBufferError on first call, then succeed
@@ -3778,7 +3778,7 @@ def test_init_main_session_no_console_error(monkeypatch):
37783778 assert isinstance (kwargs ['output' ], DummyOutput )
37793779
37803780
3781- def test_init_main_session_with_custom_tty () -> None :
3781+ def test_create_main_session_with_custom_tty () -> None :
37823782 # Create a mock stdin with says it's a TTY
37833783 custom_stdin = mock .MagicMock (spec = io .TextIOWrapper )
37843784 custom_stdin .isatty .return_value = True
@@ -3796,13 +3796,13 @@ def test_init_main_session_with_custom_tty() -> None:
37963796 app = cmd2 .Cmd ()
37973797 app .stdin = custom_stdin
37983798 app .stdout = custom_stdout
3799- app ._initialize_main_session (auto_suggest = True , completekey = app .DEFAULT_COMPLETEKEY )
3799+ app ._create_main_session (auto_suggest = True , completekey = app .DEFAULT_COMPLETEKEY )
38003800
38013801 mock_create_input .assert_called_once_with (stdin = custom_stdin )
38023802 mock_create_output .assert_called_once_with (stdout = custom_stdout )
38033803
38043804
3805- def test_init_main_session_non_interactive () -> None :
3805+ def test_create_main_session_non_interactive () -> None :
38063806 # Set up a mock for a non-TTY stream (like a pipe)
38073807 mock_stdin = mock .MagicMock (spec = io .TextIOWrapper )
38083808 mock_stdin .isatty .return_value = False
0 commit comments