From 3e3dcb9bd5abb88adcd85b4f89e8a81e7f6fa293 Mon Sep 17 00:00:00 2001 From: Dmitrii Agibov Date: Fri, 27 Jan 2023 09:12:50 +0000 Subject: 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 --- tests/test_cli_command_validators.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'tests/test_cli_command_validators.py') 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 -- cgit v1.2.1