diff --git a/milatools/cli/commands.py b/milatools/cli/commands.py index 52fd70f2..4d23b24b 100644 --- a/milatools/cli/commands.py +++ b/milatools/cli/commands.py @@ -32,7 +32,7 @@ from ..utils.remote_v1 import RemoteV1 from .code_command import add_mila_code_arguments from .common import forward, standard_server -from .init_command import ( +from .init import ( print_welcome_message, setup_keys_on_login_node, setup_passwordless_ssh_access, diff --git a/milatools/cli/init_command.py b/milatools/cli/init.py similarity index 100% rename from milatools/cli/init_command.py rename to milatools/cli/init.py diff --git a/milatools/utils/compute_node.py b/milatools/utils/compute_node.py index 6ce6b9f8..7d9439aa 100644 --- a/milatools/utils/compute_node.py +++ b/milatools/utils/compute_node.py @@ -13,7 +13,7 @@ import warnings from milatools.cli import console -from milatools.cli.init_command import DRAC_CLUSTERS +from milatools.cli.init import DRAC_CLUSTERS from milatools.cli.utils import get_hostname_to_use_for_compute_node from milatools.utils.remote_v1 import Hide from milatools.utils.remote_v2 import RemoteV2, logger, ssh_command diff --git a/tests/cli/test_init_command.py b/tests/cli/test_init.py similarity index 98% rename from tests/cli/test_init_command.py rename to tests/cli/test_init.py index bd915468..e0addece 100644 --- a/tests/cli/test_init_command.py +++ b/tests/cli/test_init.py @@ -22,8 +22,8 @@ from prompt_toolkit.input import PipeInput, create_pipe_input from pytest_regressions.file_regression import FileRegressionFixture -from milatools.cli import init_command -from milatools.cli.init_command import ( +from milatools.cli import init +from milatools.cli.init import ( DRAC_CLUSTERS, _get_drac_username, _get_mila_username, @@ -845,12 +845,12 @@ def test_setup_windows_ssh_config_from_wsl( windows_ssh_config_path = windows_home / ".ssh" / "config" monkeypatch.setattr( - init_command, + init, running_inside_WSL.__name__, Mock(spec=running_inside_WSL, return_value=True), ) monkeypatch.setattr( - init_command, + init, get_windows_home_path_in_wsl.__name__, Mock(spec=get_windows_home_path_in_wsl, return_value=windows_home), ) @@ -921,15 +921,15 @@ def test_setup_vscode_settings( json.dump(initial_settings, f, indent=4) monkeypatch.setattr( - init_command, - init_command.vscode_installed.__name__, - Mock(spec=init_command.vscode_installed, return_value=True), + init, + init.vscode_installed.__name__, + Mock(spec=init.vscode_installed, return_value=True), ) monkeypatch.setattr( - init_command, - init_command.get_expected_vscode_settings_json_path.__name__, + init, + init.get_expected_vscode_settings_json_path.__name__, Mock( - spec=init_command.get_expected_vscode_settings_json_path, + spec=init.get_expected_vscode_settings_json_path, return_value=vscode_settings_json_path, ), ) @@ -1005,12 +1005,12 @@ def test_setup_windows_ssh_config_from_wsl_copies_keys( monkeypatch.setattr(Path, "home", Mock(spec=Path.home, return_value=linux_home)) monkeypatch.setattr( - init_command, + init, running_inside_WSL.__name__, Mock(spec=running_inside_WSL, return_value=True), ) monkeypatch.setattr( - init_command, + init, get_windows_home_path_in_wsl.__name__, Mock(spec=get_windows_home_path_in_wsl, return_value=windows_home), ) @@ -1570,16 +1570,16 @@ def test_setup_passwordless_ssh_access( spec=setup_passwordless_ssh_access_to_cluster, side_effect=[accept_mila, *(accept_drac for _ in drac_clusters_in_ssh_config)], ) - import milatools.cli.init_command + import milatools.cli.init monkeypatch.setattr( - milatools.cli.init_command, + milatools.cli.init, setup_passwordless_ssh_access_to_cluster.__name__, mock_setup_passwordless_ssh_access_to_cluster, ) monkeypatch.setattr( - milatools.cli.init_command, + milatools.cli.init, setup_keys_on_login_node.__name__, Mock(spec=setup_keys_on_login_node), ) diff --git a/tests/cli/test_init_command/test_fixes_overly_general_entry.txt b/tests/cli/test_init/test_fixes_overly_general_entry.txt similarity index 100% rename from tests/cli/test_init_command/test_fixes_overly_general_entry.txt rename to tests/cli/test_init/test_fixes_overly_general_entry.txt diff --git a/tests/cli/test_init_command/test_setup_passwordless_ssh_access_to_cluster_localhost_accept_registering_key_already_setup_.md b/tests/cli/test_init/test_setup_passwordless_ssh_access_to_cluster_localhost_accept_registering_key_already_setup_.md similarity index 100% rename from tests/cli/test_init_command/test_setup_passwordless_ssh_access_to_cluster_localhost_accept_registering_key_already_setup_.md rename to tests/cli/test_init/test_setup_passwordless_ssh_access_to_cluster_localhost_accept_registering_key_already_setup_.md diff --git a/tests/cli/test_init_command/test_setup_passwordless_ssh_access_to_cluster_localhost_accept_registering_key_not_already_setup_.md b/tests/cli/test_init/test_setup_passwordless_ssh_access_to_cluster_localhost_accept_registering_key_not_already_setup_.md similarity index 100% rename from tests/cli/test_init_command/test_setup_passwordless_ssh_access_to_cluster_localhost_accept_registering_key_not_already_setup_.md rename to tests/cli/test_init/test_setup_passwordless_ssh_access_to_cluster_localhost_accept_registering_key_not_already_setup_.md diff --git a/tests/cli/test_init_command/test_setup_passwordless_ssh_access_to_cluster_localhost_reject_registering_key_already_setup_.md b/tests/cli/test_init/test_setup_passwordless_ssh_access_to_cluster_localhost_reject_registering_key_already_setup_.md similarity index 100% rename from tests/cli/test_init_command/test_setup_passwordless_ssh_access_to_cluster_localhost_reject_registering_key_already_setup_.md rename to tests/cli/test_init/test_setup_passwordless_ssh_access_to_cluster_localhost_reject_registering_key_already_setup_.md diff --git a/tests/cli/test_init_command/test_setup_passwordless_ssh_access_to_cluster_localhost_reject_registering_key_not_already_setup_.md b/tests/cli/test_init/test_setup_passwordless_ssh_access_to_cluster_localhost_reject_registering_key_not_already_setup_.md similarity index 100% rename from tests/cli/test_init_command/test_setup_passwordless_ssh_access_to_cluster_localhost_reject_registering_key_not_already_setup_.md rename to tests/cli/test_init/test_setup_passwordless_ssh_access_to_cluster_localhost_reject_registering_key_not_already_setup_.md diff --git a/tests/cli/test_init_command/test_setup_ssh_empty_confirm_changes_drac_.md b/tests/cli/test_init/test_setup_ssh_empty_confirm_changes_drac_.md similarity index 100% rename from tests/cli/test_init_command/test_setup_ssh_empty_confirm_changes_drac_.md rename to tests/cli/test_init/test_setup_ssh_empty_confirm_changes_drac_.md diff --git a/tests/cli/test_init_command/test_setup_ssh_empty_confirm_changes_no_drac_.md b/tests/cli/test_init/test_setup_ssh_empty_confirm_changes_no_drac_.md similarity index 100% rename from tests/cli/test_init_command/test_setup_ssh_empty_confirm_changes_no_drac_.md rename to tests/cli/test_init/test_setup_ssh_empty_confirm_changes_no_drac_.md diff --git a/tests/cli/test_init_command/test_setup_ssh_empty_reject_changes_drac_.md b/tests/cli/test_init/test_setup_ssh_empty_reject_changes_drac_.md similarity index 100% rename from tests/cli/test_init_command/test_setup_ssh_empty_reject_changes_drac_.md rename to tests/cli/test_init/test_setup_ssh_empty_reject_changes_drac_.md diff --git a/tests/cli/test_init_command/test_setup_ssh_empty_reject_changes_no_drac_.md b/tests/cli/test_init/test_setup_ssh_empty_reject_changes_no_drac_.md similarity index 100% rename from tests/cli/test_init_command/test_setup_ssh_empty_reject_changes_no_drac_.md rename to tests/cli/test_init/test_setup_ssh_empty_reject_changes_no_drac_.md diff --git a/tests/cli/test_init_command/test_setup_ssh_has_comment_and_entry_confirm_changes_drac_.md b/tests/cli/test_init/test_setup_ssh_has_comment_and_entry_confirm_changes_drac_.md similarity index 100% rename from tests/cli/test_init_command/test_setup_ssh_has_comment_and_entry_confirm_changes_drac_.md rename to tests/cli/test_init/test_setup_ssh_has_comment_and_entry_confirm_changes_drac_.md diff --git a/tests/cli/test_init_command/test_setup_ssh_has_comment_and_entry_confirm_changes_no_drac_.md b/tests/cli/test_init/test_setup_ssh_has_comment_and_entry_confirm_changes_no_drac_.md similarity index 100% rename from tests/cli/test_init_command/test_setup_ssh_has_comment_and_entry_confirm_changes_no_drac_.md rename to tests/cli/test_init/test_setup_ssh_has_comment_and_entry_confirm_changes_no_drac_.md diff --git a/tests/cli/test_init_command/test_setup_ssh_has_comment_and_entry_reject_changes_drac_.md b/tests/cli/test_init/test_setup_ssh_has_comment_and_entry_reject_changes_drac_.md similarity index 100% rename from tests/cli/test_init_command/test_setup_ssh_has_comment_and_entry_reject_changes_drac_.md rename to tests/cli/test_init/test_setup_ssh_has_comment_and_entry_reject_changes_drac_.md diff --git a/tests/cli/test_init_command/test_setup_ssh_has_comment_and_entry_reject_changes_no_drac_.md b/tests/cli/test_init/test_setup_ssh_has_comment_and_entry_reject_changes_no_drac_.md similarity index 100% rename from tests/cli/test_init_command/test_setup_ssh_has_comment_and_entry_reject_changes_no_drac_.md rename to tests/cli/test_init/test_setup_ssh_has_comment_and_entry_reject_changes_no_drac_.md diff --git a/tests/cli/test_init_command/test_setup_ssh_has_comment_and_entry_with_extra_space_confirm_changes_drac_.md b/tests/cli/test_init/test_setup_ssh_has_comment_and_entry_with_extra_space_confirm_changes_drac_.md similarity index 100% rename from tests/cli/test_init_command/test_setup_ssh_has_comment_and_entry_with_extra_space_confirm_changes_drac_.md rename to tests/cli/test_init/test_setup_ssh_has_comment_and_entry_with_extra_space_confirm_changes_drac_.md diff --git a/tests/cli/test_init_command/test_setup_ssh_has_comment_and_entry_with_extra_space_confirm_changes_no_drac_.md b/tests/cli/test_init/test_setup_ssh_has_comment_and_entry_with_extra_space_confirm_changes_no_drac_.md similarity index 100% rename from tests/cli/test_init_command/test_setup_ssh_has_comment_and_entry_with_extra_space_confirm_changes_no_drac_.md rename to tests/cli/test_init/test_setup_ssh_has_comment_and_entry_with_extra_space_confirm_changes_no_drac_.md diff --git a/tests/cli/test_init_command/test_setup_ssh_has_comment_and_entry_with_extra_space_reject_changes_drac_.md b/tests/cli/test_init/test_setup_ssh_has_comment_and_entry_with_extra_space_reject_changes_drac_.md similarity index 100% rename from tests/cli/test_init_command/test_setup_ssh_has_comment_and_entry_with_extra_space_reject_changes_drac_.md rename to tests/cli/test_init/test_setup_ssh_has_comment_and_entry_with_extra_space_reject_changes_drac_.md diff --git a/tests/cli/test_init_command/test_setup_ssh_has_comment_and_entry_with_extra_space_reject_changes_no_drac_.md b/tests/cli/test_init/test_setup_ssh_has_comment_and_entry_with_extra_space_reject_changes_no_drac_.md similarity index 100% rename from tests/cli/test_init_command/test_setup_ssh_has_comment_and_entry_with_extra_space_reject_changes_no_drac_.md rename to tests/cli/test_init/test_setup_ssh_has_comment_and_entry_with_extra_space_reject_changes_no_drac_.md diff --git a/tests/cli/test_init_command/test_setup_ssh_has_comment_confirm_changes_drac_.md b/tests/cli/test_init/test_setup_ssh_has_comment_confirm_changes_drac_.md similarity index 100% rename from tests/cli/test_init_command/test_setup_ssh_has_comment_confirm_changes_drac_.md rename to tests/cli/test_init/test_setup_ssh_has_comment_confirm_changes_drac_.md diff --git a/tests/cli/test_init_command/test_setup_ssh_has_comment_confirm_changes_no_drac_.md b/tests/cli/test_init/test_setup_ssh_has_comment_confirm_changes_no_drac_.md similarity index 100% rename from tests/cli/test_init_command/test_setup_ssh_has_comment_confirm_changes_no_drac_.md rename to tests/cli/test_init/test_setup_ssh_has_comment_confirm_changes_no_drac_.md diff --git a/tests/cli/test_init_command/test_setup_ssh_has_comment_reject_changes_drac_.md b/tests/cli/test_init/test_setup_ssh_has_comment_reject_changes_drac_.md similarity index 100% rename from tests/cli/test_init_command/test_setup_ssh_has_comment_reject_changes_drac_.md rename to tests/cli/test_init/test_setup_ssh_has_comment_reject_changes_drac_.md diff --git a/tests/cli/test_init_command/test_setup_ssh_has_comment_reject_changes_no_drac_.md b/tests/cli/test_init/test_setup_ssh_has_comment_reject_changes_no_drac_.md similarity index 100% rename from tests/cli/test_init_command/test_setup_ssh_has_comment_reject_changes_no_drac_.md rename to tests/cli/test_init/test_setup_ssh_has_comment_reject_changes_no_drac_.md diff --git a/tests/cli/test_init_command/test_setup_ssh_has_different_indent_confirm_changes_drac_.md b/tests/cli/test_init/test_setup_ssh_has_different_indent_confirm_changes_drac_.md similarity index 100% rename from tests/cli/test_init_command/test_setup_ssh_has_different_indent_confirm_changes_drac_.md rename to tests/cli/test_init/test_setup_ssh_has_different_indent_confirm_changes_drac_.md diff --git a/tests/cli/test_init_command/test_setup_ssh_has_different_indent_confirm_changes_no_drac_.md b/tests/cli/test_init/test_setup_ssh_has_different_indent_confirm_changes_no_drac_.md similarity index 100% rename from tests/cli/test_init_command/test_setup_ssh_has_different_indent_confirm_changes_no_drac_.md rename to tests/cli/test_init/test_setup_ssh_has_different_indent_confirm_changes_no_drac_.md diff --git a/tests/cli/test_init_command/test_setup_ssh_has_different_indent_reject_changes_drac_.md b/tests/cli/test_init/test_setup_ssh_has_different_indent_reject_changes_drac_.md similarity index 100% rename from tests/cli/test_init_command/test_setup_ssh_has_different_indent_reject_changes_drac_.md rename to tests/cli/test_init/test_setup_ssh_has_different_indent_reject_changes_drac_.md diff --git a/tests/cli/test_init_command/test_setup_ssh_has_different_indent_reject_changes_no_drac_.md b/tests/cli/test_init/test_setup_ssh_has_different_indent_reject_changes_no_drac_.md similarity index 100% rename from tests/cli/test_init_command/test_setup_ssh_has_different_indent_reject_changes_no_drac_.md rename to tests/cli/test_init/test_setup_ssh_has_different_indent_reject_changes_no_drac_.md diff --git a/tests/cli/test_init_command/test_setup_vscode_settings_accept_None_.md b/tests/cli/test_init/test_setup_vscode_settings_accept_None_.md similarity index 100% rename from tests/cli/test_init_command/test_setup_vscode_settings_accept_None_.md rename to tests/cli/test_init/test_setup_vscode_settings_accept_None_.md diff --git a/tests/cli/test_init_command/test_setup_vscode_settings_accept_initial_settings1_.md b/tests/cli/test_init/test_setup_vscode_settings_accept_initial_settings1_.md similarity index 100% rename from tests/cli/test_init_command/test_setup_vscode_settings_accept_initial_settings1_.md rename to tests/cli/test_init/test_setup_vscode_settings_accept_initial_settings1_.md diff --git a/tests/cli/test_init_command/test_setup_vscode_settings_accept_initial_settings2_.md b/tests/cli/test_init/test_setup_vscode_settings_accept_initial_settings2_.md similarity index 100% rename from tests/cli/test_init_command/test_setup_vscode_settings_accept_initial_settings2_.md rename to tests/cli/test_init/test_setup_vscode_settings_accept_initial_settings2_.md diff --git a/tests/cli/test_init_command/test_setup_vscode_settings_accept_initial_settings3_.md b/tests/cli/test_init/test_setup_vscode_settings_accept_initial_settings3_.md similarity index 100% rename from tests/cli/test_init_command/test_setup_vscode_settings_accept_initial_settings3_.md rename to tests/cli/test_init/test_setup_vscode_settings_accept_initial_settings3_.md diff --git a/tests/cli/test_init_command/test_setup_vscode_settings_accept_initial_settings4_.md b/tests/cli/test_init/test_setup_vscode_settings_accept_initial_settings4_.md similarity index 100% rename from tests/cli/test_init_command/test_setup_vscode_settings_accept_initial_settings4_.md rename to tests/cli/test_init/test_setup_vscode_settings_accept_initial_settings4_.md diff --git a/tests/cli/test_init_command/test_setup_windows_ssh_config_from_wsl_accept_.md b/tests/cli/test_init/test_setup_windows_ssh_config_from_wsl_accept_.md similarity index 100% rename from tests/cli/test_init_command/test_setup_windows_ssh_config_from_wsl_accept_.md rename to tests/cli/test_init/test_setup_windows_ssh_config_from_wsl_accept_.md diff --git a/tests/cli/test_init_command/test_setup_windows_ssh_config_from_wsl_reject_.md b/tests/cli/test_init/test_setup_windows_ssh_config_from_wsl_reject_.md similarity index 100% rename from tests/cli/test_init_command/test_setup_windows_ssh_config_from_wsl_reject_.md rename to tests/cli/test_init/test_setup_windows_ssh_config_from_wsl_reject_.md diff --git a/tests/cli/test_init_command/test_with_existing_entries_has_mila_compute_entry_has_mila_cpu_entry_has_mila_entry_has_drac_entries_.md b/tests/cli/test_init/test_with_existing_entries_has_mila_compute_entry_has_mila_cpu_entry_has_mila_entry_has_drac_entries_.md similarity index 100% rename from tests/cli/test_init_command/test_with_existing_entries_has_mila_compute_entry_has_mila_cpu_entry_has_mila_entry_has_drac_entries_.md rename to tests/cli/test_init/test_with_existing_entries_has_mila_compute_entry_has_mila_cpu_entry_has_mila_entry_has_drac_entries_.md diff --git a/tests/cli/test_init_command/test_with_existing_entries_has_mila_compute_entry_has_mila_cpu_entry_has_mila_entry_no_drac_entries_.md b/tests/cli/test_init/test_with_existing_entries_has_mila_compute_entry_has_mila_cpu_entry_has_mila_entry_no_drac_entries_.md similarity index 100% rename from tests/cli/test_init_command/test_with_existing_entries_has_mila_compute_entry_has_mila_cpu_entry_has_mila_entry_no_drac_entries_.md rename to tests/cli/test_init/test_with_existing_entries_has_mila_compute_entry_has_mila_cpu_entry_has_mila_entry_no_drac_entries_.md diff --git a/tests/cli/test_init_command/test_with_existing_entries_has_mila_compute_entry_has_mila_cpu_entry_no_mila_entry_has_drac_entries_.md b/tests/cli/test_init/test_with_existing_entries_has_mila_compute_entry_has_mila_cpu_entry_no_mila_entry_has_drac_entries_.md similarity index 100% rename from tests/cli/test_init_command/test_with_existing_entries_has_mila_compute_entry_has_mila_cpu_entry_no_mila_entry_has_drac_entries_.md rename to tests/cli/test_init/test_with_existing_entries_has_mila_compute_entry_has_mila_cpu_entry_no_mila_entry_has_drac_entries_.md diff --git a/tests/cli/test_init_command/test_with_existing_entries_has_mila_compute_entry_has_mila_cpu_entry_no_mila_entry_no_drac_entries_.md b/tests/cli/test_init/test_with_existing_entries_has_mila_compute_entry_has_mila_cpu_entry_no_mila_entry_no_drac_entries_.md similarity index 100% rename from tests/cli/test_init_command/test_with_existing_entries_has_mila_compute_entry_has_mila_cpu_entry_no_mila_entry_no_drac_entries_.md rename to tests/cli/test_init/test_with_existing_entries_has_mila_compute_entry_has_mila_cpu_entry_no_mila_entry_no_drac_entries_.md diff --git a/tests/cli/test_init_command/test_with_existing_entries_has_mila_compute_entry_no_mila_cpu_entry_has_mila_entry_has_drac_entries_.md b/tests/cli/test_init/test_with_existing_entries_has_mila_compute_entry_no_mila_cpu_entry_has_mila_entry_has_drac_entries_.md similarity index 100% rename from tests/cli/test_init_command/test_with_existing_entries_has_mila_compute_entry_no_mila_cpu_entry_has_mila_entry_has_drac_entries_.md rename to tests/cli/test_init/test_with_existing_entries_has_mila_compute_entry_no_mila_cpu_entry_has_mila_entry_has_drac_entries_.md diff --git a/tests/cli/test_init_command/test_with_existing_entries_has_mila_compute_entry_no_mila_cpu_entry_has_mila_entry_no_drac_entries_.md b/tests/cli/test_init/test_with_existing_entries_has_mila_compute_entry_no_mila_cpu_entry_has_mila_entry_no_drac_entries_.md similarity index 100% rename from tests/cli/test_init_command/test_with_existing_entries_has_mila_compute_entry_no_mila_cpu_entry_has_mila_entry_no_drac_entries_.md rename to tests/cli/test_init/test_with_existing_entries_has_mila_compute_entry_no_mila_cpu_entry_has_mila_entry_no_drac_entries_.md diff --git a/tests/cli/test_init_command/test_with_existing_entries_has_mila_compute_entry_no_mila_cpu_entry_no_mila_entry_has_drac_entries_.md b/tests/cli/test_init/test_with_existing_entries_has_mila_compute_entry_no_mila_cpu_entry_no_mila_entry_has_drac_entries_.md similarity index 100% rename from tests/cli/test_init_command/test_with_existing_entries_has_mila_compute_entry_no_mila_cpu_entry_no_mila_entry_has_drac_entries_.md rename to tests/cli/test_init/test_with_existing_entries_has_mila_compute_entry_no_mila_cpu_entry_no_mila_entry_has_drac_entries_.md diff --git a/tests/cli/test_init_command/test_with_existing_entries_has_mila_compute_entry_no_mila_cpu_entry_no_mila_entry_no_drac_entries_.md b/tests/cli/test_init/test_with_existing_entries_has_mila_compute_entry_no_mila_cpu_entry_no_mila_entry_no_drac_entries_.md similarity index 100% rename from tests/cli/test_init_command/test_with_existing_entries_has_mila_compute_entry_no_mila_cpu_entry_no_mila_entry_no_drac_entries_.md rename to tests/cli/test_init/test_with_existing_entries_has_mila_compute_entry_no_mila_cpu_entry_no_mila_entry_no_drac_entries_.md diff --git a/tests/cli/test_init_command/test_with_existing_entries_no_mila_compute_entry_has_mila_cpu_entry_has_mila_entry_has_drac_entries_.md b/tests/cli/test_init/test_with_existing_entries_no_mila_compute_entry_has_mila_cpu_entry_has_mila_entry_has_drac_entries_.md similarity index 100% rename from tests/cli/test_init_command/test_with_existing_entries_no_mila_compute_entry_has_mila_cpu_entry_has_mila_entry_has_drac_entries_.md rename to tests/cli/test_init/test_with_existing_entries_no_mila_compute_entry_has_mila_cpu_entry_has_mila_entry_has_drac_entries_.md diff --git a/tests/cli/test_init_command/test_with_existing_entries_no_mila_compute_entry_has_mila_cpu_entry_has_mila_entry_no_drac_entries_.md b/tests/cli/test_init/test_with_existing_entries_no_mila_compute_entry_has_mila_cpu_entry_has_mila_entry_no_drac_entries_.md similarity index 100% rename from tests/cli/test_init_command/test_with_existing_entries_no_mila_compute_entry_has_mila_cpu_entry_has_mila_entry_no_drac_entries_.md rename to tests/cli/test_init/test_with_existing_entries_no_mila_compute_entry_has_mila_cpu_entry_has_mila_entry_no_drac_entries_.md diff --git a/tests/cli/test_init_command/test_with_existing_entries_no_mila_compute_entry_has_mila_cpu_entry_no_mila_entry_has_drac_entries_.md b/tests/cli/test_init/test_with_existing_entries_no_mila_compute_entry_has_mila_cpu_entry_no_mila_entry_has_drac_entries_.md similarity index 100% rename from tests/cli/test_init_command/test_with_existing_entries_no_mila_compute_entry_has_mila_cpu_entry_no_mila_entry_has_drac_entries_.md rename to tests/cli/test_init/test_with_existing_entries_no_mila_compute_entry_has_mila_cpu_entry_no_mila_entry_has_drac_entries_.md diff --git a/tests/cli/test_init_command/test_with_existing_entries_no_mila_compute_entry_has_mila_cpu_entry_no_mila_entry_no_drac_entries_.md b/tests/cli/test_init/test_with_existing_entries_no_mila_compute_entry_has_mila_cpu_entry_no_mila_entry_no_drac_entries_.md similarity index 100% rename from tests/cli/test_init_command/test_with_existing_entries_no_mila_compute_entry_has_mila_cpu_entry_no_mila_entry_no_drac_entries_.md rename to tests/cli/test_init/test_with_existing_entries_no_mila_compute_entry_has_mila_cpu_entry_no_mila_entry_no_drac_entries_.md diff --git a/tests/cli/test_init_command/test_with_existing_entries_no_mila_compute_entry_no_mila_cpu_entry_has_mila_entry_has_drac_entries_.md b/tests/cli/test_init/test_with_existing_entries_no_mila_compute_entry_no_mila_cpu_entry_has_mila_entry_has_drac_entries_.md similarity index 100% rename from tests/cli/test_init_command/test_with_existing_entries_no_mila_compute_entry_no_mila_cpu_entry_has_mila_entry_has_drac_entries_.md rename to tests/cli/test_init/test_with_existing_entries_no_mila_compute_entry_no_mila_cpu_entry_has_mila_entry_has_drac_entries_.md diff --git a/tests/cli/test_init_command/test_with_existing_entries_no_mila_compute_entry_no_mila_cpu_entry_has_mila_entry_no_drac_entries_.md b/tests/cli/test_init/test_with_existing_entries_no_mila_compute_entry_no_mila_cpu_entry_has_mila_entry_no_drac_entries_.md similarity index 100% rename from tests/cli/test_init_command/test_with_existing_entries_no_mila_compute_entry_no_mila_cpu_entry_has_mila_entry_no_drac_entries_.md rename to tests/cli/test_init/test_with_existing_entries_no_mila_compute_entry_no_mila_cpu_entry_has_mila_entry_no_drac_entries_.md diff --git a/tests/cli/test_init_command/test_with_existing_entries_no_mila_compute_entry_no_mila_cpu_entry_no_mila_entry_has_drac_entries_.md b/tests/cli/test_init/test_with_existing_entries_no_mila_compute_entry_no_mila_cpu_entry_no_mila_entry_has_drac_entries_.md similarity index 100% rename from tests/cli/test_init_command/test_with_existing_entries_no_mila_compute_entry_no_mila_cpu_entry_no_mila_entry_has_drac_entries_.md rename to tests/cli/test_init/test_with_existing_entries_no_mila_compute_entry_no_mila_cpu_entry_no_mila_entry_has_drac_entries_.md diff --git a/tests/cli/test_init_command/test_with_existing_entries_no_mila_compute_entry_no_mila_cpu_entry_no_mila_entry_no_drac_entries_.md b/tests/cli/test_init/test_with_existing_entries_no_mila_compute_entry_no_mila_cpu_entry_no_mila_entry_no_drac_entries_.md similarity index 100% rename from tests/cli/test_init_command/test_with_existing_entries_no_mila_compute_entry_no_mila_cpu_entry_no_mila_entry_no_drac_entries_.md rename to tests/cli/test_init/test_with_existing_entries_no_mila_compute_entry_no_mila_cpu_entry_no_mila_entry_no_drac_entries_.md diff --git a/tests/cli/test_utils.py b/tests/cli/test_utils.py index 5c90f0fc..f6653a74 100644 --- a/tests/cli/test_utils.py +++ b/tests/cli/test_utils.py @@ -16,7 +16,7 @@ yn, ) -from .test_init_command import PipeInput, input_pipe # noqa +from .test_init import PipeInput, input_pipe # noqa def test_randname(file_regression): diff --git a/tests/conftest.py b/tests/conftest.py index 5d6f4f9c..15f773de 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -16,7 +16,7 @@ import questionary from fabric.connection import Connection -from milatools.cli.init_command import setup_ssh_config +from milatools.cli.init import setup_ssh_config from milatools.utils.compute_node import get_queued_milatools_job_ids from milatools.utils.remote_v1 import RemoteV1 from milatools.utils.remote_v2 import ( @@ -360,7 +360,7 @@ def ssh_config_file( monkeypatch: pytest.MonkeyPatch, ) -> Path: """Fixture that creates the SSH config as setup by `mila init`.""" - from milatools.cli.init_command import yn + from milatools.cli.init import yn # NOTE: might want to put this in a fixture if we wanted the "real" mila / drac # usernames in the config. @@ -381,9 +381,9 @@ def _yn(question: str) -> bool: mock_yn = Mock(spec=yn, side_effect=_yn) - import milatools.cli.init_command + import milatools.cli.init - monkeypatch.setattr(milatools.cli.init_command, yn.__name__, mock_yn) + monkeypatch.setattr(milatools.cli.init, yn.__name__, mock_yn) def _mock_unsafe_ask(question: str, *args, **kwargs) -> str: question = question.strip()