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

use pathlib more frequently

parent 1fef4659
No related branches found
No related tags found
2 merge requests!19Move linux-debian11 into main,!1Resolve "First draft for user interface for top level install command"
......@@ -36,14 +36,14 @@ def test_prepare_environment(tmp_path):
assert not script_dir.exists()
result = mod.prepare_environment(
mpsd_release=mpsd_release_to_test, script_dir=str(script_dir)
mpsd_release=mpsd_release_to_test, script_dir=(script_dir)
)
# wait for 20 seconds for the git clone to finish
# time.sleep(20)
# check if the directory now is created
assert release_base_dir.exists()
# check for spack-environments directory
assert spack_environments in os.listdir(str(release_base_dir))
assert spack_environments in os.listdir(release_base_dir)
# check if the git branch is correctly checked out
assert (
subprocess.run(
......@@ -71,7 +71,7 @@ def test_setup_log_cmd(tmp_path):
# run the prepare_env functionality
mod.prepare_env(
toolchain_base_dir=str(tmp_path),
toolchain_base_dir=(tmp_path),
mpsd_spack_ver="dev-23a",
skip_dir_check=False,
shared_var=shared_var,
......@@ -81,6 +81,7 @@ def test_setup_log_cmd(tmp_path):
assert os.path.exists("logs/install-software-environment.log")
assert os.path.getsize("logs/install-software-environment.log") > initial_bytes
def test_install_environment(tmp_path):
# Expect and Exception when wrong toolchains are provided
with pytest.raises(Exception):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment