From f2abb9959db1df931f8508d202e16ee365bdf1ad Mon Sep 17 00:00:00 2001 From: Kangxu Liu Date: Fri, 22 Nov 2024 10:18:49 +0800 Subject: [PATCH 1/2] Update the expected exception when a file does not exist --- libs/cli/tests/unit_tests/test_config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/cli/tests/unit_tests/test_config.py b/libs/cli/tests/unit_tests/test_config.py index c1632a8b3..8b99bc717 100644 --- a/libs/cli/tests/unit_tests/test_config.py +++ b/libs/cli/tests/unit_tests/test_config.py @@ -212,7 +212,7 @@ def test_config_to_docker_pipconfig(): def test_config_to_docker_invalid_inputs(): # test missing local dependencies - with pytest.raises(FileNotFoundError): + with pytest.raises(UsageError): graphs = {"agent": "tests/unit_tests/agent.py:graph"} config_to_docker( PATH_TO_CONFIG, @@ -221,7 +221,7 @@ def test_config_to_docker_invalid_inputs(): ) # test missing local module - with pytest.raises(FileNotFoundError): + with pytest.raises(UsageError): graphs = {"agent": "./missing_agent.py:graph"} config_to_docker( PATH_TO_CONFIG, From 9ab6a9ea991c5332fb7179807190ccf74f7b95db Mon Sep 17 00:00:00 2001 From: Kangxu Liu Date: Sat, 23 Nov 2024 08:40:21 +0800 Subject: [PATCH 2/2] Fix namesapce --- libs/cli/tests/unit_tests/test_config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/cli/tests/unit_tests/test_config.py b/libs/cli/tests/unit_tests/test_config.py index 8b99bc717..de7ff90a0 100644 --- a/libs/cli/tests/unit_tests/test_config.py +++ b/libs/cli/tests/unit_tests/test_config.py @@ -212,7 +212,7 @@ def test_config_to_docker_pipconfig(): def test_config_to_docker_invalid_inputs(): # test missing local dependencies - with pytest.raises(UsageError): + with pytest.raises(click.UsageError): graphs = {"agent": "tests/unit_tests/agent.py:graph"} config_to_docker( PATH_TO_CONFIG, @@ -221,7 +221,7 @@ def test_config_to_docker_invalid_inputs(): ) # test missing local module - with pytest.raises(UsageError): + with pytest.raises(click.UsageError): graphs = {"agent": "./missing_agent.py:graph"} config_to_docker( PATH_TO_CONFIG,