Skip to content
Snippets Groups Projects
Commit ed1fe951 authored by Ashwin Kumar Karnad's avatar Ashwin Kumar Karnad
Browse files

rename initialize_environment function to initialise_environment

parent 6b25baa6
Branches
No related tags found
1 merge request!93Rename initialize_environment function to initialise_environment
Pipeline #374573 passed
......@@ -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
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment