Skip to content

Commit

Permalink
test(sandbox)🧪: Remove redundant test for script execution with depen…
Browse files Browse the repository at this point in the history
…dencies.

- Deleted the test_script_with_dependencies function from test_sandbox.py.
- This was deemed unnecessary because we do allow access to the internet from within the container.
  • Loading branch information
ericmjl committed Jan 28, 2025
1 parent a27af17 commit c537fbd
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions tests/components/test_sandbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,24 +99,6 @@ def test_script_execution_error(script_metadata):
assert "Test error" in str(exc_info.value)


def test_script_with_dependencies(script_metadata):
"""Test script execution with dependencies."""
requests_script = """
import json
import requests
response = requests.get("https://httpbin.org/get")
print(json.dumps({"status": response.status_code}))
"""

executor = ScriptExecutor()
script_path = executor.write_script(requests_script, script_metadata)

# This should fail because network access is disabled
with pytest.raises(Exception):
executor.run_script(script_path)


def test_custom_temp_dir():
"""Test using a custom temporary directory."""
temp_dir = Path("/tmp/test_sandbox")
Expand Down

0 comments on commit c537fbd

Please sign in to comment.