aboutsummaryrefslogtreecommitdiff
path: root/tests/test_backend_corstone_install.py
diff options
context:
space:
mode:
authorBenedetta Delfino <benedetta.delfino@arm.com>2024-03-14 11:38:13 +0000
committerBenedetta Delfino <benedetta.delfino@arm.com>2024-03-21 11:44:30 +0000
commit508281df31dc3c18f2e007f4dd505160342a681a (patch)
tree598571d1ddc046947b84a77a161fefd80b31fbbd /tests/test_backend_corstone_install.py
parent1aedaa2b6795bf4eec773e68c39acbb812df7b26 (diff)
downloadmlia-508281df31dc3c18f2e007f4dd505160342a681a.tar.gz
refactor: Refactored functions for Corstone installations
Signed-off-by: Benedetta Delfino <benedetta.delfino@arm.com> Change-Id: I51f845e9fc9f0a699a239c63c268565487be2aeb
Diffstat (limited to 'tests/test_backend_corstone_install.py')
-rw-r--r--tests/test_backend_corstone_install.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/test_backend_corstone_install.py b/tests/test_backend_corstone_install.py
index 496e378..326118d 100644
--- a/tests/test_backend_corstone_install.py
+++ b/tests/test_backend_corstone_install.py
@@ -11,16 +11,15 @@ from unittest.mock import MagicMock
import pytest
from mlia.backend.corstone.install import CorstoneInstaller
-from mlia.backend.corstone.install import get_corstone_installations
+from mlia.backend.corstone.install import get_corstone_installation
from mlia.backend.install import Installation
-def test_get_corstone_installations() -> None:
- """Test function get_corstone_installations."""
- installations = get_corstone_installations()
- assert len(installations) == 2
-
- assert all(isinstance(item, Installation) for item in installations)
+@pytest.mark.parametrize("corstone_name", ["corstone-300", "corstone-310"])
+def test_get_corstone_installation(corstone_name: str) -> None:
+ """Test Corstone installation"""
+ installation = get_corstone_installation(corstone_name)
+ assert isinstance(installation, Installation)
@pytest.mark.parametrize(