aboutsummaryrefslogtreecommitdiff
path: root/tests_e2e
diff options
context:
space:
mode:
authorBenjamin Klimczak <benjamin.klimczak@arm.com>2023-08-24 16:38:47 +0100
committerBenjamin Klimczak <benjamin.klimczak@arm.com>2023-09-05 14:20:08 +0100
commite5a0bc3ecd4d9c46ead3b8217584eaa916a3afa4 (patch)
tree94c348fcef50326a755a049a2a4027f588211f8b /tests_e2e
parent900c3c52b681e0b8a4454e2e2cf29265d53a2c98 (diff)
downloadmlia-e5a0bc3ecd4d9c46ead3b8217584eaa916a3afa4.tar.gz
MLIA-961 Update tox dependencies
- Update version dependencies in the tox.ini - Fix linter issues Change-Id: I04c3a841ee2646a865dab037701d66c28792f2a4 Signed-off-by: Benjamin Klimczak <benjamin.klimczak@arm.com>
Diffstat (limited to 'tests_e2e')
-rw-r--r--tests_e2e/test_e2e.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests_e2e/test_e2e.py b/tests_e2e/test_e2e.py
index c164901..2d8c375 100644
--- a/tests_e2e/test_e2e.py
+++ b/tests_e2e/test_e2e.py
@@ -44,13 +44,13 @@ class ExecutionConfiguration:
def from_dict(cls, exec_info: dict) -> ExecutionConfiguration:
"""Create instance from the dictionary."""
if not (command := exec_info.get("command")):
- raise Exception("Command is not defined")
+ raise ValueError("Command is not defined.")
if command not in VALID_COMMANDS:
- raise Exception(f"Unknown command {command}")
+ raise ValueError(f"Command {command} is unknown.")
if not (params := exec_info.get("parameters")):
- raise Exception(f"Command {command} should have parameters")
+ raise ValueError(f"Command {command} should have parameters.")
assert isinstance(params, dict), "Parameters should be a dictionary"
assert all(
@@ -101,13 +101,13 @@ def launch_and_wait(
if print_output:
print(output)
else:
- raise Exception("Unable to get process output")
+ raise RuntimeError("Unable to get process output. stdout is unavailable.")
# Wait for the process to terminate
process.wait()
if (exit_code := process.poll()) != 0:
- raise Exception(f"Command failed with exit_code {exit_code}")
+ raise RuntimeError(f"Command failed with exit_code {exit_code}.")
def run_command(
@@ -142,11 +142,11 @@ def get_config_file() -> Path:
"""Get path to the configuration file."""
env_var_name = "MLIA_E2E_CONFIG_FILE"
if not (config_file_env_var := os.environ.get(env_var_name)):
- raise Exception(f"Config file env variable ({env_var_name}) is not set")
+ raise ValueError(f"Config file env variable ({env_var_name}) is not set.")
config_file = Path(config_file_env_var)
if not config_file.is_file():
- raise Exception(f"Invalid config file {config_file_env_var}")
+ raise FileNotFoundError(f"Invalid config file {config_file_env_var}.")
return config_file