aboutsummaryrefslogtreecommitdiff
path: root/tests/test_core_context.py
diff options
context:
space:
mode:
authorDmitrii Agibov <dmitrii.agibov@arm.com>2023-02-02 09:07:02 +0000
committerDmitrii Agibov <dmitrii.agibov@arm.com>2023-02-06 11:51:52 +0000
commitc6cfc78d5245c550016b9709686d2b32ab3fcd5b (patch)
tree42786a3755370d0fefea659d7e532a5483955239 /tests/test_core_context.py
parentf1eaff3c9790464bed3183ff76555cf815166f50 (diff)
downloadmlia-c6cfc78d5245c550016b9709686d2b32ab3fcd5b.tar.gz
MLIA-461 Add parameter for the output directory
- Add CLI parameter --output-dir - Rename ExecutionContext property working_dir into output_dir - Remove logic for default command as it is no longer needed Change-Id: I6387f6b688520ba1fc69a80167587297353620f6
Diffstat (limited to 'tests/test_core_context.py')
-rw-r--r--tests/test_core_context.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_core_context.py b/tests/test_core_context.py
index 0e7145f..814cb6a 100644
--- a/tests/test_core_context.py
+++ b/tests/test_core_context.py
@@ -52,7 +52,7 @@ def test_execution_context(tmpdir: str) -> None:
context = ExecutionContext(
advice_category=category,
config_parameters={"param": "value"},
- working_dir=tmpdir,
+ output_dir=tmpdir,
event_handlers=[],
event_publisher=publisher,
verbose=True,
@@ -72,14 +72,14 @@ def test_execution_context(tmpdir: str) -> None:
assert context.output_format == "json"
assert str(context) == (
f"ExecutionContext: "
- f"working_dir={tmpdir}, "
+ f"output_dir={tmpdir}, "
"advice_category={'COMPATIBILITY'}, "
"config_parameters={'param': 'value'}, "
"verbose=True, "
"output_format=json"
)
- context_with_default_params = ExecutionContext(working_dir=tmpdir)
+ context_with_default_params = ExecutionContext(output_dir=tmpdir)
assert context_with_default_params.advice_category == {AdviceCategory.COMPATIBILITY}
assert context_with_default_params.config_parameters is None
assert context_with_default_params.event_handlers is None
@@ -94,7 +94,7 @@ def test_execution_context(tmpdir: str) -> None:
assert context_with_default_params.output_format == "plain_text"
expected_str = (
- f"ExecutionContext: working_dir={tmpdir}, "
+ f"ExecutionContext: output_dir={tmpdir}, "
"advice_category={'COMPATIBILITY'}, "
"config_parameters=None, "
"verbose=False, "