From 05178df91ac5eeeb23cd4c00fe83a30c59d2b057 Mon Sep 17 00:00:00 2001 From: Partho Sarthi Date: Wed, 1 Nov 2023 16:25:25 -0700 Subject: [PATCH] Update tests Signed-off-by: Partho Sarthi --- user_tools/src/spark_rapids_tools/utils/util.py | 2 +- .../tests/spark_rapids_tools_ut/test_tool_argprocessor.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/user_tools/src/spark_rapids_tools/utils/util.py b/user_tools/src/spark_rapids_tools/utils/util.py index 71497eddc..e8ed7e05d 100644 --- a/user_tools/src/spark_rapids_tools/utils/util.py +++ b/user_tools/src/spark_rapids_tools/utils/util.py @@ -92,7 +92,7 @@ def dump_tool_usage(tool_name: Optional[str], raise_sys_exit: Optional[bool] = T imported_module = __import__('spark_rapids_tools.cmdli', globals(), locals(), ['ToolsCLI']) wrapper_clzz = getattr(imported_module, 'ToolsCLI') help_name = 'ascli' - usage_cmd = f'{tool_name} --help' + usage_cmd = f'{tool_name} -- --help' try: fire.Fire(wrapper_clzz(), name=help_name, command=usage_cmd) except fire.core.FireExit: diff --git a/user_tools/tests/spark_rapids_tools_ut/test_tool_argprocessor.py b/user_tools/tests/spark_rapids_tools_ut/test_tool_argprocessor.py index f1c719421..49d8f9cec 100644 --- a/user_tools/tests/spark_rapids_tools_ut/test_tool_argprocessor.py +++ b/user_tools/tests/spark_rapids_tools_ut/test_tool_argprocessor.py @@ -166,8 +166,8 @@ def test_cluster_props_no_eventlogs_on_prem(self, capsys, tool_name): platform='onprem') assert pytest_wrapped_e.type == SystemExit captured = capsys.readouterr() - # Verify there is no URL in error message - assert 'https://' not in captured.err + # Verify there is no URL in error message except for the one from the documentation + assert 'https://' not in captured.err or 'nvidia.github.io' in captured.err @pytest.mark.skip(reason='Unit tests are not completed yet') def test_arg_cases_coverage(self):