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

update tests

parent cc76673c
Branches
No related tags found
1 merge request!82Remove cmd
This commit is part of merge request !82. Comments created here will be created in the context of that merge request.
......@@ -509,7 +509,6 @@ def test_environment_status(tmp_path):
assert set(toolchain_map[microarch]) == set(expected_toolchain_map[microarch])
@pytest.mark.skip(reason="not implemented yet")
def test_remove_environment(tmp_path):
"""Test that the remove_environment works as expected."""
mpsd_release = "dev-23a"
......@@ -521,15 +520,18 @@ def test_remove_environment(tmp_path):
# test removal without arguments (should sys.exit(1))
create_fake_environment(tmp_path, mpsd_release)
with pytest.raises(SystemExit):
with pytest.raises(SystemExit) as pytest_wrapped_e:
mod.remove_environment(mpsd_release, tmp_path, force_remove=True)
assert pytest_wrapped_e.type == SystemExit
assert pytest_wrapped_e.value.code == 1
# test removal of the complete environment
create_fake_environment(tmp_path, mpsd_release)
mod.remove_environment(mpsd_release, tmp_path, ["ALL"], force_remove=True)
toolchain_map = mod.environment_status(mpsd_release, tmp_path)
assert toolchain_map is None
# ensure that logs folder remains
logs_folder = tmp_path / mpsd_release / "logs"
logs_folder = tmp_path / mpsd_release / mod.get_native_microarchitecture() / "logs"
assert logs_folder.exists()
# test removal of a single toolchain
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment