diff --git a/tests/test_agentrun.py b/tests/test_agentrun.py index 092195b..bc9b50c 100644 --- a/tests/test_agentrun.py +++ b/tests/test_agentrun.py @@ -160,10 +160,10 @@ def test_parse_dependencies(code, expected, docker_container): @pytest.mark.parametrize( "code, expected, whitelist", [ - # dependencies: requests, open whitelist + # dependencies: numpy, open whitelist ( - "import requests\nprint(requests.get('https://example.com').status_code)", - "200\n", + "import numpy as np\nprint(np.array([1, 2, 3]))", + "[1 2 3]\n", ["*"], ), # dependencies: numpy, but not in the whitelist @@ -180,9 +180,9 @@ def test_parse_dependencies(code, expected, docker_container): ), # dependencies: requests, in the whitelist ( - "import requests\nprint(requests.get('https://example.com').status_code)", - "200\n", - ["requests"], + "import numpy as np\nprint(np.array([1, 2, 3]))", + "[1 2 3]\n", + ["numpy"], ), # a dependency that doesn't exist ( @@ -190,12 +190,6 @@ def test_parse_dependencies(code, expected, docker_container): "Failed to install dependency unknownpackage", ["*"], ), - # string list from env - ( - "import math\nprint(math.sqrt(16))", - "4.0\n", - '["requests"]', - ), ], ) def test_execute_code_with_dependencies(code, expected, whitelist, docker_container):