From 6fb169d29701324a688c5020cfbe0f73325b009b Mon Sep 17 00:00:00 2001 From: sailgpu Date: Thu, 26 Oct 2023 17:43:31 +0000 Subject: [PATCH 1/5] initial pytest commit --- llm/tests/__init__.py | 0 llm/tests/test_download.py | 301 +++++++++++++++++++++++++++++++ llm/tests/test_torchserve_run.py | 170 +++++++++++++++++ 3 files changed, 471 insertions(+) create mode 100644 llm/tests/__init__.py create mode 100644 llm/tests/test_download.py create mode 100644 llm/tests/test_torchserve_run.py diff --git a/llm/tests/__init__.py b/llm/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/llm/tests/test_download.py b/llm/tests/test_download.py new file mode 100644 index 0000000..0972528 --- /dev/null +++ b/llm/tests/test_download.py @@ -0,0 +1,301 @@ +""" +This module runs pytest tests for download.py file. + +Attributes: + MODEL_NAME: Name of the model used for testing (gpt2). + MODEL_PATH: Default path to model files. + MODEL_STORE: Default model store location. + MODEL_CONFIG_PATH: Path to model_config.json file. + MODEL_TEMP_CONFIG_PATH: Path to backup model_config.json file. +""" +import os +import argparse +import shutil +import json +from pathlib import Path +import pytest +import download +from utils.shell_utils import copy_file + +MODEL_NAME = "gpt2" +MODEL_PATH = os.path.join(os.path.dirname(__file__), "model_path") +MODEL_STORE = os.path.join(os.path.dirname(__file__), "model_store") +MODEL_CONFIG_PATH = os.path.join( + os.path.dirname(os.path.dirname(__file__)), "model_config.json" +) +MODEL_TEMP_CONFIG_PATH = os.path.join(MODEL_STORE, "temp_model_config.json") + + +def rm_dir(path): + """ + This function deletes a directory. + + Args: + path (str): Path to directory. + """ + path = Path(path) + if os.path.exists(path): + print(f"Deleting directory : {path}") + shutil.rmtree(path) + + +def download_setup(): + """ + This function deletes and creates model store and + model path directories. + """ + rm_dir(MODEL_PATH) + rm_dir(MODEL_STORE) + os.makedirs(MODEL_PATH) + os.makedirs(MODEL_STORE) + + +def cleanup_folders(): + """ + This function deletes model store and model path directories. + """ + rm_dir(MODEL_PATH) + rm_dir(MODEL_STORE) + + +def set_generate_args( + model_name=MODEL_NAME, + repo_version="", + model_path=MODEL_PATH, + mar_output=MODEL_STORE, + handler_path="", +): + """ + This function sets the arguments to run download.py. + + Args: + repo_version (str, optional): Repository version of the model. Defaults to "". + model_path (str, optional): Path to model files. Defaults to MODEL_PATH. + mar_output (str, optional): Model store location. Defaults to MODEL_STORE. + handler_path (str, optional): Path to Torchserve handler. Defaults to "". + + Returns: + argparse.Namespace: Parameters to run download.py. + """ + args = argparse.Namespace() + args.model_name = model_name + args.model_path = model_path + args.mar_output = mar_output + args.no_download = False + args.repo_version = repo_version + args.handler_path = handler_path + args.debug = False + args.hf_token = "" + return args + + +def test_case_1(): + """ + This function tests the default GPT2 model. + Expected result: Success. + """ + download_setup() + args = set_generate_args() + try: + result = download.run_script(args) + except SystemExit: + assert False + else: + assert result is True + + +def test_case_2(): + """ + This function tests wrong model store path. + Expected result: Failure. + """ + download_setup() + args = set_generate_args(mar_output="wrong_model_store") + try: + download.run_script(args) + except SystemExit as e: + assert e.code == 1 + else: + assert False + + +def test_case_3(): + """ + This function tests wrong model files path. + Expected result: Failure. + """ + download_setup() + args = set_generate_args(model_path="wrong_model_path") + try: + download.run_script(args) + except SystemExit as e: + assert e.code == 1 + else: + assert False + + +def test_case_4(): + """ + This function tests non empty model files path without skip download. + Expected result: Failure. + """ + download_setup() + with open(os.path.join(MODEL_PATH, "non_empty.txt"), "w", encoding="UTF-8") as file: + file.write("non empty text") + args = set_generate_args() + try: + download.run_script(args) + except SystemExit as e: + assert e.code == 1 + else: + assert False + + +def test_case_5(): + """ + This function tests invalid repo version. + Expected result: Failure. + """ + download_setup() + args = set_generate_args(repo_version="invalid_repo_version") + try: + download.run_script(args) + except SystemExit as e: + assert e.code == 1 + else: + assert False + + +def test_case_6(): + """ + This function tests valid repo version. + Expected result: Success. + """ + download_setup() + args = set_generate_args(repo_version="e7da7f221d5bf496a48136c0cd264e630fe9fcc8") + try: + result = download.run_script(args) + except SystemExit: + assert False + else: + assert result is True + + +def test_case_7(): + """ + This function tests invalid handler path. + Expected result: Failure. + """ + download_setup() + args = set_generate_args(handler_path="invalid_handler.py") + try: + download.run_script(args) + except SystemExit as e: + assert e.code == 1 + else: + assert False + + +def test_case_8(): + """ + This function tests skip download without model files. + Expected result: Failure. + """ + download_setup() + args = set_generate_args() + args.no_download = True + try: + download.run_script(args) + except SystemExit as e: + assert e.code == 1 + else: + assert False + + +def test_case_9(): + """ + This function tests if MAR file already exists. + Expected result: Exits. + """ + download_setup() + args = set_generate_args() + download.run_script(args) + try: + download.run_script(args) + except SystemExit as e: + assert e.code == 1 + else: + assert False + + +def test_case_10(): + """ + This function tests skip download case. + Expected result: Success. + """ + download_setup() + args = set_generate_args() + download.run_script(args) + + # clear model store directory + rm_dir(MODEL_STORE) + os.makedirs(MODEL_STORE) + args = set_generate_args() + args.no_download = True + try: + result = download.run_script(args) + except SystemExit: + assert False + else: + assert result is True + + +def custom_model_setup(): + """ + This function is used to setup custom model case. + It runs download.py to download model files and + deletes the contents of 'model_config.json' after + making a backup. + """ + download_setup() + args = set_generate_args() + download.run_script(args) + + # creating a backup of original model_config.json + copy_file(MODEL_CONFIG_PATH, MODEL_TEMP_CONFIG_PATH) + with open(MODEL_CONFIG_PATH, "w", encoding="UTF-8") as file: + json.dump({}, file) + + +def custom_model_restore(): + """ + This function restores the 'model_config.json' file + and runs cleanup_folders function. + """ + os.remove(MODEL_CONFIG_PATH) + shutil.copyfile(MODEL_TEMP_CONFIG_PATH, MODEL_CONFIG_PATH) + cleanup_folders() + + +def test_case_11(): + """ + This function tests the custom model case. + This is done by clearing the 'model_config.json' and + generating the 'GPT2' MAR file. + Expected result: Success. + """ + custom_model_setup() + args = set_generate_args() + args.no_download = True + try: + result = download.run_script(args) + except SystemExit: + assert False + else: + assert result is True + custom_model_restore() + + +# Run the tests +if __name__ == "__main__": + pytest.main(["-v", __file__]) diff --git a/llm/tests/test_torchserve_run.py b/llm/tests/test_torchserve_run.py new file mode 100644 index 0000000..96287b3 --- /dev/null +++ b/llm/tests/test_torchserve_run.py @@ -0,0 +1,170 @@ +""" +This module runs pytest tests for run.sh file. + +Attributes: + INPUT_PATH: Path to input data folder. +""" +import os +import subprocess +import pytest +import download +from tests.test_download import ( + MODEL_STORE, + MODEL_NAME, + set_generate_args, + custom_model_restore, + custom_model_setup, + test_case_1, +) + +INPUT_PATH = os.path.join( + os.path.dirname(os.path.dirname(os.path.dirname(__file__))), "data", "qa" +) + + +def test_generate_mar(): + """ + This function calls the default testcase from test_download.py + This is done to generate the MAR file used in the rest of the + tests. + """ + test_case_1() + + +def get_run_cmd( + model_name=MODEL_NAME, model_store=MODEL_STORE, input_path="", repo_version="" +): + """ + This function is used to generate the bash command to be run using given + parameters + + Args: + model_name (str, optional): Name of the model. Defaults to MODEL_NAME. + model_store (str, optional): Model store location. Defaults to MODEL_STORE. + input_path (str, optional): Path to input data folder. Defaults to "". + repo_version (str, optional): Repository version of the model. Defaults to "". + + Returns: + list(str): Bash command converted to list of strings spilt by spaces. + """ + cmd = "bash run.sh" + if model_name: + cmd = f"{cmd} -n {model_name}" + if model_store: + cmd = f"{cmd} -a {model_store}" + if input_path: + cmd = f"{cmd} -d {input_path}" + if repo_version: + cmd = f"{cmd} -v {repo_version}" + return cmd.split() + + +def test_run_case_1(): + """ + This function tests the default GPT2 model with input path. + Expected result: Success. + """ + process = subprocess.run(get_run_cmd(input_path=INPUT_PATH), check=False) + assert process.returncode == 0 + + +def test_run_case_2(): + """ + This function tests the default GPT2 model without input path. + Expected result: Success. + """ + process = subprocess.run(get_run_cmd(), check=False) + assert process.returncode == 0 + + +def test_run_case_3(): + """ + This function tests missing model name. + Expected result: Failure. + """ + process = subprocess.run(get_run_cmd(model_name=""), check=False) + assert process.returncode == 1 + + +def test_run_case_4(): + """ + This function tests wrong model name. + Expected result: Failure. + """ + process = subprocess.run(get_run_cmd(model_name="wrong_model_name"), check=False) + assert process.returncode == 1 + + +def test_run_case_5(): + """ + This function tests missing model store. + Expected result: Failure. + """ + process = subprocess.run(get_run_cmd(model_store=""), check=False) + assert process.returncode == 1 + + +def test_run_case_6(): + """ + This function tests wrong model store. + Expected result: Failure. + """ + process = subprocess.run(get_run_cmd(model_store="wrong_model_store"), check=False) + assert process.returncode == 1 + + +def test_run_case_7(): + """ + This function tests wrong input path. + Expected result: Failure. + """ + process = subprocess.run(get_run_cmd(input_path="wrong_input_path"), check=False) + assert process.returncode == 1 + + +def test_run_case_8(): + """ + This function tests valid repo version. + Expected result: Success. + """ + process = subprocess.run( + get_run_cmd(repo_version="11c5a3d5811f50298f278a704980280950aedb10"), + check=False, + ) + assert process.returncode == 0 + + +def test_run_case_9(): + """ + This function tests invalid repo version. + Expected result: Failure. + """ + process = subprocess.run( + get_run_cmd(repo_version="invalid_repo_version"), check=False + ) + assert process.returncode == 1 + + +def test_run_case_10(): + """ + This function tests custom model with input folder. + Expected result: Success. + """ + custom_model_setup() + args = set_generate_args() + args.no_download = True + try: + download.run_script(args) + except SystemExit: + assert False + + process = subprocess.run(get_run_cmd(input_path=INPUT_PATH), check=False) + assert process.returncode == 0 + + custom_model_restore() + process = subprocess.run(["python3", "cleanup.py"], check=False) + + +# Run the tests +if __name__ == "__main__": + pytest.main(["-v", __file__]) From 3ec4025b9cb1289a27b94649c5789fe41bc35450 Mon Sep 17 00:00:00 2001 From: sailgpu Date: Thu, 26 Oct 2023 17:46:38 +0000 Subject: [PATCH 2/5] pytest.yaml addition --- .github/workflows/pytest.yaml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/pytest.yaml diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml new file mode 100644 index 0000000..dadfbc3 --- /dev/null +++ b/.github/workflows/pytest.yaml @@ -0,0 +1,31 @@ +name: Pytest tests + +on: + # Trigger the workflow on push or pull request, + # but only for the main branch + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + run-pytest: + name: Run tests + runs-on: ubuntu-latest + + steps: + - name: Check out Git repository + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v1 + with: + python-version: 3.11 + + - name: Install Python dependencies + run: pip install pytest -r llm/requirements.txt + + - name: Run pytests + run: cd llm && python3 -m pytest tests From c053b8df5598aeb8c51cca67152bb064e11d5c43 Mon Sep 17 00:00:00 2001 From: sailgpu Date: Fri, 27 Oct 2023 12:47:22 +0000 Subject: [PATCH 3/5] test function names change --- llm/tests/test_download.py | 22 +++++++++++----------- llm/tests/test_torchserve_run.py | 24 ++++++++++++------------ 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/llm/tests/test_download.py b/llm/tests/test_download.py index 0972528..54efbc4 100644 --- a/llm/tests/test_download.py +++ b/llm/tests/test_download.py @@ -89,7 +89,7 @@ def set_generate_args( return args -def test_case_1(): +def test_case_default(): """ This function tests the default GPT2 model. Expected result: Success. @@ -104,7 +104,7 @@ def test_case_1(): assert result is True -def test_case_2(): +def test_case_wrong_model_store(): """ This function tests wrong model store path. Expected result: Failure. @@ -119,7 +119,7 @@ def test_case_2(): assert False -def test_case_3(): +def test_case_wrong_model_path(): """ This function tests wrong model files path. Expected result: Failure. @@ -134,7 +134,7 @@ def test_case_3(): assert False -def test_case_4(): +def test_case_non_empty_model_path(): """ This function tests non empty model files path without skip download. Expected result: Failure. @@ -151,7 +151,7 @@ def test_case_4(): assert False -def test_case_5(): +def test_case_invalid_repo_version(): """ This function tests invalid repo version. Expected result: Failure. @@ -166,7 +166,7 @@ def test_case_5(): assert False -def test_case_6(): +def test_case_valid_repo_version(): """ This function tests valid repo version. Expected result: Success. @@ -181,7 +181,7 @@ def test_case_6(): assert result is True -def test_case_7(): +def test_case_invalid_handler(): """ This function tests invalid handler path. Expected result: Failure. @@ -196,7 +196,7 @@ def test_case_7(): assert False -def test_case_8(): +def test_case_skip_download_fail(): """ This function tests skip download without model files. Expected result: Failure. @@ -212,7 +212,7 @@ def test_case_8(): assert False -def test_case_9(): +def test_case_mar_exists(): """ This function tests if MAR file already exists. Expected result: Exits. @@ -228,7 +228,7 @@ def test_case_9(): assert False -def test_case_10(): +def test_case_success_skip_download(): """ This function tests skip download case. Expected result: Success. @@ -277,7 +277,7 @@ def custom_model_restore(): cleanup_folders() -def test_case_11(): +def test_case_custom_model(): """ This function tests the custom model case. This is done by clearing the 'model_config.json' and diff --git a/llm/tests/test_torchserve_run.py b/llm/tests/test_torchserve_run.py index 96287b3..11f6cb3 100644 --- a/llm/tests/test_torchserve_run.py +++ b/llm/tests/test_torchserve_run.py @@ -14,7 +14,7 @@ set_generate_args, custom_model_restore, custom_model_setup, - test_case_1, + test_case_default, ) INPUT_PATH = os.path.join( @@ -28,7 +28,7 @@ def test_generate_mar(): This is done to generate the MAR file used in the rest of the tests. """ - test_case_1() + test_case_default() def get_run_cmd( @@ -59,7 +59,7 @@ def get_run_cmd( return cmd.split() -def test_run_case_1(): +def test_run_case_default(): """ This function tests the default GPT2 model with input path. Expected result: Success. @@ -68,7 +68,7 @@ def test_run_case_1(): assert process.returncode == 0 -def test_run_case_2(): +def test_run_case_default_no_input_path(): """ This function tests the default GPT2 model without input path. Expected result: Success. @@ -77,7 +77,7 @@ def test_run_case_2(): assert process.returncode == 0 -def test_run_case_3(): +def test_run_case_no_model_name(): """ This function tests missing model name. Expected result: Failure. @@ -86,7 +86,7 @@ def test_run_case_3(): assert process.returncode == 1 -def test_run_case_4(): +def test_run_case_wrong_model_name(): """ This function tests wrong model name. Expected result: Failure. @@ -95,7 +95,7 @@ def test_run_case_4(): assert process.returncode == 1 -def test_run_case_5(): +def test_run_case_no_model_store(): """ This function tests missing model store. Expected result: Failure. @@ -104,7 +104,7 @@ def test_run_case_5(): assert process.returncode == 1 -def test_run_case_6(): +def test_run_case_wrong_model_store(): """ This function tests wrong model store. Expected result: Failure. @@ -113,7 +113,7 @@ def test_run_case_6(): assert process.returncode == 1 -def test_run_case_7(): +def test_run_case_wrong_input_path(): """ This function tests wrong input path. Expected result: Failure. @@ -122,7 +122,7 @@ def test_run_case_7(): assert process.returncode == 1 -def test_run_case_8(): +def test_run_case_vaild_repo_version(): """ This function tests valid repo version. Expected result: Success. @@ -134,7 +134,7 @@ def test_run_case_8(): assert process.returncode == 0 -def test_run_case_9(): +def test_run_case_invalid_repo_version(): """ This function tests invalid repo version. Expected result: Failure. @@ -145,7 +145,7 @@ def test_run_case_9(): assert process.returncode == 1 -def test_run_case_10(): +def test_run_case_custom_model(): """ This function tests custom model with input folder. Expected result: Success. From 5e569525caf32f4d114afe9444c2bd7dbea8bd50 Mon Sep 17 00:00:00 2001 From: sailgpu Date: Fri, 27 Oct 2023 12:51:43 +0000 Subject: [PATCH 4/5] minor change --- llm/tests/test_download.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llm/tests/test_download.py b/llm/tests/test_download.py index 54efbc4..9a3a90a 100644 --- a/llm/tests/test_download.py +++ b/llm/tests/test_download.py @@ -228,7 +228,7 @@ def test_case_mar_exists(): assert False -def test_case_success_skip_download(): +def test_case_skip_download_success(): """ This function tests skip download case. Expected result: Success. From f2c22921e663d62e35671feb17e3e7d32a91ac46 Mon Sep 17 00:00:00 2001 From: sailgpu Date: Fri, 27 Oct 2023 13:41:58 +0000 Subject: [PATCH 5/5] minor function name changes --- .github/workflows/pytest.yaml | 2 +- README.md | 6 +++--- llm/tests/test_download.py | 22 +++++++++++----------- llm/tests/test_torchserve_run.py | 26 +++++++++++++------------- 4 files changed, 28 insertions(+), 28 deletions(-) diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index dadfbc3..1f7077b 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -28,4 +28,4 @@ jobs: run: pip install pytest -r llm/requirements.txt - name: Run pytests - run: cd llm && python3 -m pytest tests + run: cd llm && python3 -m pytest tests -v diff --git a/README.md b/README.md index 9e35503..4e92bb7 100644 --- a/README.md +++ b/README.md @@ -73,15 +73,15 @@ For model names, we support MPT-7B, Falcon-7b and Llama2-7B. Should print "Ready For Inferencing" as a message at the end #### Examples -For 1 GPU Inference with official MPT-7B model: +For Inference with official MPT-7B model: ``` bash llm/run.sh -n mpt_7b -d data/translate -a /home/ubuntu/models/model_store ``` -For 1 GPU Inference with official Falcon-7B model: +For Inference with official Falcon-7B model: ``` bash llm/run.sh -n falcon_7b -d data/qa -a /home/ubuntu/models/model_store ``` -For 1 GPU Inference with official Llama2-7B model: +For Inference with official Llama2-7B model: ``` bash llm/run.sh -n llama2_7b -d data/summarize -a /home/ubuntu/models/model_store ``` diff --git a/llm/tests/test_download.py b/llm/tests/test_download.py index 9a3a90a..04c06dd 100644 --- a/llm/tests/test_download.py +++ b/llm/tests/test_download.py @@ -89,7 +89,7 @@ def set_generate_args( return args -def test_case_default(): +def test_default_generate_success(): """ This function tests the default GPT2 model. Expected result: Success. @@ -104,7 +104,7 @@ def test_case_default(): assert result is True -def test_case_wrong_model_store(): +def test_wrong_model_store_throw_error(): """ This function tests wrong model store path. Expected result: Failure. @@ -119,7 +119,7 @@ def test_case_wrong_model_store(): assert False -def test_case_wrong_model_path(): +def test_wrong_model_path_throw_error(): """ This function tests wrong model files path. Expected result: Failure. @@ -134,7 +134,7 @@ def test_case_wrong_model_path(): assert False -def test_case_non_empty_model_path(): +def test_non_empty_model_path_throw_error(): """ This function tests non empty model files path without skip download. Expected result: Failure. @@ -151,7 +151,7 @@ def test_case_non_empty_model_path(): assert False -def test_case_invalid_repo_version(): +def test_invalid_repo_version_throw_error(): """ This function tests invalid repo version. Expected result: Failure. @@ -166,7 +166,7 @@ def test_case_invalid_repo_version(): assert False -def test_case_valid_repo_version(): +def test_valid_repo_version_success(): """ This function tests valid repo version. Expected result: Success. @@ -181,7 +181,7 @@ def test_case_valid_repo_version(): assert result is True -def test_case_invalid_handler(): +def test_invalid_handler_throw_error(): """ This function tests invalid handler path. Expected result: Failure. @@ -196,7 +196,7 @@ def test_case_invalid_handler(): assert False -def test_case_skip_download_fail(): +def test_skip_download_throw_error(): """ This function tests skip download without model files. Expected result: Failure. @@ -212,7 +212,7 @@ def test_case_skip_download_fail(): assert False -def test_case_mar_exists(): +def test_mar_exists_throw_error(): """ This function tests if MAR file already exists. Expected result: Exits. @@ -228,7 +228,7 @@ def test_case_mar_exists(): assert False -def test_case_skip_download_success(): +def test_skip_download_success(): """ This function tests skip download case. Expected result: Success. @@ -277,7 +277,7 @@ def custom_model_restore(): cleanup_folders() -def test_case_custom_model(): +def test_custom_model_success(): """ This function tests the custom model case. This is done by clearing the 'model_config.json' and diff --git a/llm/tests/test_torchserve_run.py b/llm/tests/test_torchserve_run.py index 11f6cb3..6b0a511 100644 --- a/llm/tests/test_torchserve_run.py +++ b/llm/tests/test_torchserve_run.py @@ -14,7 +14,7 @@ set_generate_args, custom_model_restore, custom_model_setup, - test_case_default, + test_default_generate_success, ) INPUT_PATH = os.path.join( @@ -22,13 +22,13 @@ ) -def test_generate_mar(): +def test_generate_mar_success(): """ This function calls the default testcase from test_download.py This is done to generate the MAR file used in the rest of the tests. """ - test_case_default() + test_default_generate_success() def get_run_cmd( @@ -59,7 +59,7 @@ def get_run_cmd( return cmd.split() -def test_run_case_default(): +def test_default_success(): """ This function tests the default GPT2 model with input path. Expected result: Success. @@ -68,7 +68,7 @@ def test_run_case_default(): assert process.returncode == 0 -def test_run_case_default_no_input_path(): +def test_default_no_input_path_success(): """ This function tests the default GPT2 model without input path. Expected result: Success. @@ -77,7 +77,7 @@ def test_run_case_default_no_input_path(): assert process.returncode == 0 -def test_run_case_no_model_name(): +def test_no_model_name_throw_error(): """ This function tests missing model name. Expected result: Failure. @@ -86,7 +86,7 @@ def test_run_case_no_model_name(): assert process.returncode == 1 -def test_run_case_wrong_model_name(): +def test_wrong_model_name_throw_error(): """ This function tests wrong model name. Expected result: Failure. @@ -95,7 +95,7 @@ def test_run_case_wrong_model_name(): assert process.returncode == 1 -def test_run_case_no_model_store(): +def test_no_model_store_throw_error(): """ This function tests missing model store. Expected result: Failure. @@ -104,7 +104,7 @@ def test_run_case_no_model_store(): assert process.returncode == 1 -def test_run_case_wrong_model_store(): +def test_wrong_model_store_throw_error(): """ This function tests wrong model store. Expected result: Failure. @@ -113,7 +113,7 @@ def test_run_case_wrong_model_store(): assert process.returncode == 1 -def test_run_case_wrong_input_path(): +def test_wrong_input_path_throw_error(): """ This function tests wrong input path. Expected result: Failure. @@ -122,7 +122,7 @@ def test_run_case_wrong_input_path(): assert process.returncode == 1 -def test_run_case_vaild_repo_version(): +def test_vaild_repo_version_success(): """ This function tests valid repo version. Expected result: Success. @@ -134,7 +134,7 @@ def test_run_case_vaild_repo_version(): assert process.returncode == 0 -def test_run_case_invalid_repo_version(): +def test_invalid_repo_version_throw_error(): """ This function tests invalid repo version. Expected result: Failure. @@ -145,7 +145,7 @@ def test_run_case_invalid_repo_version(): assert process.returncode == 1 -def test_run_case_custom_model(): +def test_custom_model_success(): """ This function tests custom model with input folder. Expected result: Success.