diff options
author | Benjamin Klimczak <benjamin.klimczak@arm.com> | 2022-06-28 10:29:35 +0100 |
---|---|---|
committer | Benjamin Klimczak <benjamin.klimczak@arm.com> | 2022-07-08 10:57:19 +0100 |
commit | c9b4089b3037b5943565d76242d3016b8776f8d2 (patch) | |
tree | 3de24f79dedf0f26f492a7fa1562bf684e13a055 /tests/aiet/test_cli.py | |
parent | ba2c7fcccf37e8c81946f0776714c64f73191787 (diff) | |
download | mlia-c9b4089b3037b5943565d76242d3016b8776f8d2.tar.gz |
MLIA-546 Merge AIET into MLIA
Merge the deprecated AIET interface for backend execution into MLIA:
- Execute backends directly (without subprocess and the aiet CLI)
- Fix issues with the unit tests
- Remove src/aiet and tests/aiet
- Re-factor code to replace 'aiet' with 'backend'
- Adapt and improve unit tests after re-factoring
- Remove dependencies that are not needed anymore (click and cloup)
Change-Id: I450734c6a3f705ba9afde41862b29e797e511f7c
Diffstat (limited to 'tests/aiet/test_cli.py')
-rw-r--r-- | tests/aiet/test_cli.py | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/tests/aiet/test_cli.py b/tests/aiet/test_cli.py deleted file mode 100644 index e8589fa..0000000 --- a/tests/aiet/test_cli.py +++ /dev/null @@ -1,37 +0,0 @@ -# SPDX-FileCopyrightText: Copyright 2022, Arm Limited and/or its affiliates. -# SPDX-License-Identifier: Apache-2.0 -"""Module for testing CLI top command.""" -from typing import Any -from unittest.mock import ANY -from unittest.mock import MagicMock - -from click.testing import CliRunner - -from aiet.cli import cli - - -def test_cli(cli_runner: CliRunner) -> None: - """Test CLI top level command.""" - result = cli_runner.invoke(cli) - assert result.exit_code == 0 - assert "system" in cli.commands - assert "application" in cli.commands - - -def test_cli_version(cli_runner: CliRunner) -> None: - """Test version option.""" - result = cli_runner.invoke(cli, ["--version"]) - assert result.exit_code == 0 - assert "version" in result.output - - -def test_cli_verbose(cli_runner: CliRunner, monkeypatch: Any) -> None: - """Test verbose option.""" - with monkeypatch.context() as mock_context: - mock = MagicMock() - # params[1] is the verbose option and we need to replace the - # callback with a mock object - mock_context.setattr(cli.params[1], "callback", mock) - cli_runner.invoke(cli, ["-vvvv"]) - # 4 is the number -v called earlier - mock.assert_called_once_with(ANY, ANY, 4) |