aboutsummaryrefslogtreecommitdiff
path: root/tests/test_tools_metadata_corstone.py
diff options
context:
space:
mode:
authorRuomei Yan <ruomei.yan@arm.com>2022-11-02 16:47:56 +0000
committerRuomei Yan <ruomei.yan@arm.com>2022-11-15 13:02:56 +0000
commit47fc50576e7040680c19e152592b2c5e5cc297f5 (patch)
treef10fc331e7bc7358c7da8cf3582d9428db4e7367 /tests/test_tools_metadata_corstone.py
parentef73bb773df214f3f33f8e4ca7d276041106cad2 (diff)
downloadmlia-47fc50576e7040680c19e152592b2c5e5cc297f5.tar.gz
MLIA-649 Strip mlia backend management into a new command
* add entry point for mlia-backend in setup.cfg and main.py * add --force option for install from path: uninstall existing backend in ML Inference Advisor and install from given path * add uninstall and list program parameters: uninstall has backend_name as input arg, install has backend_name as a mandatory argument * add unit tests in test_cli_commands.py, test_cli_main.py, test_tools_metadata_common.py, test_tools_metadata_corstone.py * updated README.md * remove --download option for installing backend * add new lines for the display section when we do mlia-backen list * add case insensitive support for backend names in command line argument Change-Id: Icb89d8957fa6be4b767710e24fa074f26472674b
Diffstat (limited to 'tests/test_tools_metadata_corstone.py')
-rw-r--r--tests/test_tools_metadata_corstone.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/test_tools_metadata_corstone.py b/tests/test_tools_metadata_corstone.py
index 02c04d4..a7d81f2 100644
--- a/tests/test_tools_metadata_corstone.py
+++ b/tests/test_tools_metadata_corstone.py
@@ -469,3 +469,20 @@ def test_corstone_vht_install(
corstone_installation.install(InstallFromPath(Path("/opt/VHT")))
create_destination_and_install_mock.assert_called_once()
+
+
+def test_corstone_uninstall(
+ monkeypatch: pytest.MonkeyPatch,
+) -> None:
+ """Test the uninstall function in Corstone."""
+ remove_system_mock = MagicMock()
+
+ monkeypatch.setattr(
+ "mlia.tools.metadata.corstone.remove_system",
+ remove_system_mock,
+ )
+
+ installation = get_corstone_300_installation()
+
+ installation.uninstall()
+ remove_system_mock.assert_called_once_with("corstone_300")