diff options
author | Dmitrii Agibov <dmitrii.agibov@arm.com> | 2023-01-27 09:12:50 +0000 |
---|---|---|
committer | Benjamin Klimczak <benjamin.klimczak@arm.com> | 2023-02-08 15:25:11 +0000 |
commit | 3e3dcb9bd5abb88adcd85b4f89e8a81e7f6fa293 (patch) | |
tree | 020eee6abef093113de5b49c135c915c37173843 /tests/test_cli_command_validators.py | |
parent | 836efd40317a397761ec8b66e3f4398faac43ad0 (diff) | |
download | mlia-3e3dcb9bd5abb88adcd85b4f89e8a81e7f6fa293.tar.gz |
MLIA-595 Remove old backend configuration mechanism
- Remove old backend configuration code
- Install backends into directory ~/.mlia
- Rename targets/backends in registry to make it consistent
across codebase.
Change-Id: I9c8b012fe863280f1c692940c0dcad3ef638aaae
Diffstat (limited to 'tests/test_cli_command_validators.py')
-rw-r--r-- | tests/test_cli_command_validators.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/tests/test_cli_command_validators.py b/tests/test_cli_command_validators.py index 13514a5..cd048ee 100644 --- a/tests/test_cli_command_validators.py +++ b/tests/test_cli_command_validators.py @@ -4,6 +4,7 @@ from __future__ import annotations import argparse +from contextlib import ExitStack from unittest.mock import MagicMock import pytest @@ -125,9 +126,9 @@ def test_validate_check_target_profile( None, ], ["tosa", None, False, None, ["tosa-checker"]], - ["cortex-a", None, False, None, ["armnn-tflitedelegate"]], + ["cortex-a", None, False, None, ["ArmNNTFLiteDelegate"]], ["tosa", ["tosa-checker"], False, None, ["tosa-checker"]], - ["cortex-a", ["armnn-tflitedelegate"], False, None, ["armnn-tflitedelegate"]], + ["cortex-a", ["ArmNNTFLiteDelegate"], False, None, ["ArmNNTFLiteDelegate"]], [ "ethos-u55-256", ["Vela", "Corstone-300"], @@ -158,10 +159,11 @@ def test_validate_backend( MagicMock(return_value=["Vela", "Corstone-300"]), ) + exit_stack = ExitStack() if throws_exception: - with pytest.raises(argparse.ArgumentError) as err: - validate_backend(input_target_profile, input_backends) - assert str(err.value.message) == exception_message - return + exit_stack.enter_context( + pytest.raises(argparse.ArgumentError, match=exception_message) + ) - assert validate_backend(input_target_profile, input_backends) == output_backends + with exit_stack: + assert validate_backend(input_target_profile, input_backends) == output_backends |