Skip to content
Snippets Groups Projects

Remove cmd

Merged Ashwin Kumar Karnad requested to merge continue-with-remove-cmd into main
3 unresolved threads
1 file
+ 5
3
Compare changes
  • Side-by-side
  • Inline
@@ -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
Loading