diff --git a/src/mpsd_software_manager/mpsd_software.py b/src/mpsd_software_manager/mpsd_software.py index eed840acf110bd2106401617a7ca3bf3634d300d..81e438695f7fc3dcbc2a3801c9a6e578df490aa5 100755 --- a/src/mpsd_software_manager/mpsd_software.py +++ b/src/mpsd_software_manager/mpsd_software.py @@ -1085,7 +1085,7 @@ def environment_status(mpsd_release: str, root_dir: Union[str, Path]) -> dict: return toolchain_map -def initialize_environment(root_dir: Path) -> None: +def initialise_environment(root_dir: Path) -> None: """Initialize the software environment. This creates a hidden file ``.mpsd-software-root`` to tag the location for @@ -1258,7 +1258,7 @@ def main(): # Check if the action is init # if so, call the init function and exit if args.action == "init": - initialize_environment(Path(os.getcwd())) + initialise_environment(Path(os.getcwd())) sys.exit(0) # root_dir is the place where this MPSD software instance has its root diff --git a/tests/test_mpsd_software.py b/tests/test_mpsd_software.py index 79fc35cea3ee48a3f7f625abd3495bd607bcf51c..35a6a7b3b2316e0fc6bb0c55d930d0a207cd8da5 100644 --- a/tests/test_mpsd_software.py +++ b/tests/test_mpsd_software.py @@ -520,10 +520,10 @@ def test_remove_environment(tmp_path): # done in test_install_environment_zlib -def test_initialize_environment(tmp_path): +def test_initialise_environment(tmp_path): """Test that init_file is created as expected.""" # test that the init file is created as expected - mod.initialize_environment(tmp_path) + mod.initialise_environment(tmp_path) init_file = tmp_path / mod.config_vars["init_file"] assert init_file.exists() @@ -534,7 +534,7 @@ def test_initialize_environment(tmp_path): # test that calling again results in warning and exit code 1 with pytest.raises(SystemExit) as pytest_wrapped_e: - mod.initialize_environment(tmp_path) + mod.initialise_environment(tmp_path) assert pytest_wrapped_e.type == SystemExit assert pytest_wrapped_e.value.code == 1 @@ -549,7 +549,7 @@ def test_get_root_dir(tmp_path): assert pytest_wrapped_e.value.code == 1 # test that initialize_environment creates the root dir - mod.initialize_environment(tmp_path) + mod.initialise_environment(tmp_path) root_dir = mod.get_root_dir() assert root_dir == tmp_path @@ -562,7 +562,7 @@ def test_get_root_dir(tmp_path): # test that initialising in a subdirectory makes it the root dir with mod.os_chdir(sub_dir): - mod.initialize_environment(sub_dir) + mod.initialise_environment(sub_dir) root_dir = mod.get_root_dir() assert root_dir == sub_dir