repo_id string | cross_repo_split string | commit_index int32 | commit_sha string | in_repo_split string | test_file string | file_split string | split_group string | lineno int32 | col_offset int32 | assertion_type string | test_function string | prefix large_string | target string | assertion_event_type string | assertion_event_id string | assertion_anchor large_string | old_target string | old_lineno int32 | old_col_offset int32 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
vndee/llm-sandbox | train | 5 | 9e5dd7adb4ea7b1fda84c3025654a7e0b87f2ff9 | train | tests/test_session_podman.py | train | vndee/llm-sandbox:tests/test_session_podman.py | 88 | 8 | self.assertEqual | test_run_with_code | import os
import tarfile
import unittest
from io import BytesIO
from unittest.mock import patch, MagicMock
from llm_sandbox.podman import SandboxPodmanSession
class TestSandboxSession(unittest.TestCase):
@patch("podman.from_env")
def setUp(self, mock_podman_from_env):
self.mock_podman_client = MagicMo... | (0, "Output")) | added | 32b8b1b19d0b5c92b785b7f49646d2e1ab199d9daf8e2b8dab4bb6909132027e | self.assertEqual|test_run_with_code|import os import tarfile import unittest from io import BytesIO from unittest.mock import patch, MagicMock from llm_sandbox.podman import SandboxPodmanSession class TestSandboxSession(unittest.TestCase): @patch("podman.from_env") def setUp(self, mock_podman_from_env): self.mock_podma... | null | null | null |
vndee/llm-sandbox | train | 5 | 9e5dd7adb4ea7b1fda84c3025654a7e0b87f2ff9 | train | tests/test_session_podman.py | train | vndee/llm-sandbox:tests/test_session_podman.py | 149 | 13 | self.assertRaises | test_execute_empty_command | import os
import tarfile
import unittest
from io import BytesIO
from unittest.mock import patch, MagicMock
from llm_sandbox.podman import SandboxPodmanSession
class TestSandboxSession(unittest.TestCase):
@patch("podman.from_env")
def setUp(self, mock_podman_from_env):
self.mock_podman_client = MagicMo... | ValueError) | added | 8c7ab6339f80a665dab86b0512c9cae8bbee61f45ce234f471b0946712afd318 | self.assertRaises|test_execute_empty_command|import os import tarfile import unittest from io import BytesIO from unittest.mock import patch, MagicMock from llm_sandbox.podman import SandboxPodmanSession class TestSandboxSession(unittest.TestCase): @patch("podman.from_env") def setUp(self, mock_podman_from_env): self.m... | null | null | null |
vndee/llm-sandbox | train | 6 | 7cd678bee869720bd3404f636133b52b1d6a3ebd | train | tests/test_session.py | train | vndee/llm-sandbox:tests/test_session.py | 135 | 8 | assert_* | test_execute_failing_command | import os
import tarfile
import unittest
from io import BytesIO
from unittest.mock import patch, MagicMock
from llm_sandbox import SandboxSession
class TestSandboxSession(unittest.TestCase):
@patch("docker.from_env")
def setUp(self, mock_docker_from_env):
self.mock_docker_client = MagicMock()
... | command) | added | e4fdfb7e5cc50c0786b8bef75ec2d267834b5058468b0ea8185e4230ae536241 | assert_*|test_execute_failing_command|import os import tarfile import unittest from io import BytesIO from unittest.mock import patch, MagicMock from llm_sandbox import SandboxSession class TestSandboxSession(unittest.TestCase): @patch("docker.from_env") def setUp(self, mock_docker_from_env): self.mock_docker_client = ... | null | null | null |
vndee/llm-sandbox | train | 6 | 7cd678bee869720bd3404f636133b52b1d6a3ebd | train | tests/test_session_podman.py | train | vndee/llm-sandbox:tests/test_session_podman.py | 161 | 8 | assert_* | test_execute_failing_command | import os
import tarfile
import unittest
from io import BytesIO
from unittest.mock import patch, MagicMock
from llm_sandbox.podman import SandboxPodmanSession
class TestSandboxSession(unittest.TestCase):
@patch("podman.from_env")
def setUp(self, mock_podman_from_env):
self.mock_podman_client = MagicMo... | command) | added | ca3fa6600c60d2b4d4e7c9d1bdb25561e0f4cf2d50f2b1db5b79bae8ad82d925 | assert_*|test_execute_failing_command|import os import tarfile import unittest from io import BytesIO from unittest.mock import patch, MagicMock from llm_sandbox.podman import SandboxPodmanSession class TestSandboxSession(unittest.TestCase): @patch("podman.from_env") def setUp(self, mock_podman_from_env): self.mock_pod... | null | null | null |
vndee/llm-sandbox | train | 7 | 791e47cdc5656d75c0a7078459e68821fdc5860c | train | tests/test_session.py | train | vndee/llm-sandbox:tests/test_session.py | 32 | 9 | pytest.raises | test_init_with_invalid_lang | """Tests for main session functionality."""
import pytest
from unittest.mock import patch, MagicMock
from llm_sandbox import SandboxSession
from llm_sandbox.exceptions import SecurityError, ResourceError, ValidationError
@pytest.fixture
def mock_docker_client():
with patch("docker.from_env") as mock_docker_fro... | ValueError) | added | afd920a098b150a240b6f7bd45132be9707c424b523e0adbe42f6a1f5f20c53f | pytest.raises|test_init_with_invalid_lang|"""Tests for main session functionality.""" import pytest from unittest.mock import patch, MagicMock from llm_sandbox import SandboxSession from llm_sandbox.exceptions import SecurityError, ResourceError, ValidationError @pytest.fixture def mock_docker_client(): with patch("doc... | null | null | null |
vndee/llm-sandbox | train | 7 | 791e47cdc5656d75c0a7078459e68821fdc5860c | train | tests/test_session.py | train | vndee/llm-sandbox:tests/test_session.py | 99 | 4 | assert | test_resource_monitoring | """Tests for main session functionality."""
import pytest
from unittest.mock import patch, MagicMock
from llm_sandbox import SandboxSession
from llm_sandbox.exceptions import SecurityError, ResourceError, ValidationError
@pytest.fixture
def mock_docker_client():
with patch("docker.from_env") as mock_docker_fro... | result.resource_usage | added | 599abecbf8e1005524d7fbd3233036d6171c84ac4d8807ed28b65e029fabede6 | assert|test_resource_monitoring|"""Tests for main session functionality.""" import pytest from unittest.mock import patch, MagicMock from llm_sandbox import SandboxSession from llm_sandbox.exceptions import SecurityError, ResourceError, ValidationError @pytest.fixture def mock_docker_client(): with patch("docker.from_e... | null | null | null |
vndee/llm-sandbox | train | 7 | 791e47cdc5656d75c0a7078459e68821fdc5860c | train | tests/test_session.py | train | vndee/llm-sandbox:tests/test_session.py | 155 | 8 | assert_* | test_execute_failing_command | """Tests for main session functionality."""
import pytest
from unittest.mock import patch, MagicMock
from llm_sandbox import SandboxSession
from llm_sandbox.exceptions import SecurityError, ResourceError, ValidationError
@pytest.fixture
def mock_docker_client():
with patch("docker.from_env") as mock_docker_fro... | command) | added | 4b04a9117a8ec4c7b5bd85201f4f100a09da9ceabe15a03d9f316ce26586ec0d | assert_*|test_execute_failing_command|"""Tests for main session functionality.""" import pytest from unittest.mock import patch, MagicMock from llm_sandbox import SandboxSession from llm_sandbox.exceptions import SecurityError, ResourceError, ValidationError @pytest.fixture def mock_docker_client(): with patch("docker.... | null | null | null |
vndee/llm-sandbox | train | 7 | 791e47cdc5656d75c0a7078459e68821fdc5860c | train | tests/test_session.py | train | vndee/llm-sandbox:tests/test_session.py | 187 | 4 | assert | test_close | """Tests for main session functionality."""
import pytest
from unittest.mock import patch, MagicMock
from llm_sandbox import SandboxSession
from llm_sandbox.exceptions import SecurityError, ResourceError, ValidationError
@pytest.fixture
def mock_docker_client():
with patch("docker.from_env") as mock_docker_fro... | None | added | cda9740d58525b13230d1548a4a05b6179d97640196926ea54ca261b3f1a978b | assert|test_close|"""Tests for main session functionality.""" import pytest from unittest.mock import patch, MagicMock from llm_sandbox import SandboxSession from llm_sandbox.exceptions import SecurityError, ResourceError, ValidationError @pytest.fixture def mock_docker_client(): with patch("docker.from_env") as mock_d... | null | null | null |
vndee/llm-sandbox | train | 8 | 286151cb2f3dae61934c37e0efa9e5dba025a741 | train | tests/test_backend.py | train | vndee/llm-sandbox:tests/test_backend.py | 259 | 8 | assert | test_kubernetes_specific_features | # ruff: noqa: SLF001, PLR2004, ARG002, FBT003
"""Integration tests for all sandbox backends."""
from unittest.mock import MagicMock, patch
import pytest
from llm_sandbox.const import SandboxBackend, SupportedLanguage
from llm_sandbox.exceptions import MissingDependencyError, UnsupportedBackendError
from llm_sandbox... | "test-namespace" | added | 830f8f0f0160e0640e9fc190b8d0b42130bb095b01e42abf7838d68ec73477f9 | assert|test_kubernetes_specific_features|# ruff: noqa: SLF001, PLR2004, ARG002, FBT003 """Integration tests for all sandbox backends.""" from unittest.mock import MagicMock, patch import pytest from llm_sandbox.const import SandboxBackend, SupportedLanguage from llm_sandbox.exceptions import MissingDependencyError, Uns... | null | null | null |
vndee/llm-sandbox | train | 8 | 286151cb2f3dae61934c37e0efa9e5dba025a741 | train | tests/test_data.py | train | vndee/llm-sandbox:tests/test_data.py | 264 | 17 | pytest.raises | test_exception_inheritance | # ruff: noqa: PLR2004, PT011
"""Tests for data models and exceptions."""
from dataclasses import FrozenInstanceError
import pytest
from llm_sandbox.data import ConsoleOutput, ExecutionResult, FileType, PlotOutput
from llm_sandbox.exceptions import (
CommandEmptyError,
CommandFailedError,
ExtraArgumentsEr... | type(exception)) | added | 25f08f0474bca31ff86e630cd709873ce52de7af8779c0b6d2171a4f527f133c | pytest.raises|test_exception_inheritance|# ruff: noqa: PLR2004, PT011 """Tests for data models and exceptions.""" from dataclasses import FrozenInstanceError import pytest from llm_sandbox.data import ConsoleOutput, ExecutionResult, FileType, PlotOutput from llm_sandbox.exceptions import ( CommandEmptyError, CommandFai... | null | null | null |
vndee/llm-sandbox | train | 8 | 286151cb2f3dae61934c37e0efa9e5dba025a741 | train | tests/test_docker.py | val | vndee/llm-sandbox:tests/test_docker.py | 610 | 17 | pytest.raises | test_context_manager_with_exception | # ruff: noqa: SLF001, PLR2004, ARG002, PT011
"""Tests for Docker backend implementation."""
import io
import tarfile
from unittest.mock import MagicMock, Mock, patch
import pytest
from llm_sandbox.const import SupportedLanguage
from llm_sandbox.data import ConsoleOutput
from llm_sandbox.docker import SandboxDockerS... | ValueError) | added | 4563b38fa5dc54d5d4cbf0ae5d8162bbcdfe19560e51fdaf6c40e52e3a777512 | pytest.raises|test_context_manager_with_exception|# ruff: noqa: SLF001, PLR2004, ARG002, PT011 """Tests for Docker backend implementation.""" import io import tarfile from unittest.mock import MagicMock, Mock, patch import pytest from llm_sandbox.const import SupportedLanguage from llm_sandbox.data import ConsoleOutput... | null | null | null |
vndee/llm-sandbox | train | 8 | 286151cb2f3dae61934c37e0efa9e5dba025a741 | train | tests/test_go_handler.py | train | vndee/llm-sandbox:tests/test_go_handler.py | 136 | 16 | assert | test_get_import_patterns_no_false_positives | # ruff: noqa: SLF001, PLR2004
import logging
import re
from unittest.mock import MagicMock
from llm_sandbox.const import SupportedLanguage
from llm_sandbox.language_handlers.go_handler import GoHandler
class TestGoHandler:
"""Test GoHandler specific functionality."""
def test_init(self) -> None:
""... | not re.search(pattern, filtered_code) | added | 3b72f71c32278112928fd30e596b54e51369fd38db4f8c11ec257a86de1f8015 | assert|test_get_import_patterns_no_false_positives|# ruff: noqa: SLF001, PLR2004 import logging import re from unittest.mock import MagicMock from llm_sandbox.const import SupportedLanguage from llm_sandbox.language_handlers.go_handler import GoHandler class TestGoHandler: """Test GoHandler specific functionality.""" d... | null | null | null |
vndee/llm-sandbox | train | 8 | 286151cb2f3dae61934c37e0efa9e5dba025a741 | train | tests/test_micromamba.py | val | vndee/llm-sandbox:tests/test_micromamba.py | 602 | 8 | assert | test_security_policy_integration | # ruff: noqa: SLF001, PLR2004, ARG002
"""Tests for Micromamba backend implementation."""
from unittest.mock import MagicMock, patch
import pytest
from llm_sandbox.const import SupportedLanguage
from llm_sandbox.data import ConsoleOutput
from llm_sandbox.micromamba import MicromambaSession
from llm_sandbox.security ... | hasattr(session, "_check_security_policy") | added | 9158ef94fb16e9bc89653f3a032e6c79c1ffe6563fa873edc6701f8bf270d589 | assert|test_security_policy_integration|# ruff: noqa: SLF001, PLR2004, ARG002 """Tests for Micromamba backend implementation.""" from unittest.mock import MagicMock, patch import pytest from llm_sandbox.const import SupportedLanguage from llm_sandbox.data import ConsoleOutput from llm_sandbox.micromamba import Micromam... | null | null | null |
vndee/llm-sandbox | train | 8 | 286151cb2f3dae61934c37e0efa9e5dba025a741 | train | tests/test_python_handler.py | train | vndee/llm-sandbox:tests/test_python_handler.py | 247 | 12 | assert | test_get_import_patterns | # ruff: noqa: SLF001, PLR2004
import base64
import io
import logging
import re
import tarfile
from unittest.mock import MagicMock, patch
import pytest
from llm_sandbox.const import SupportedLanguage
from llm_sandbox.data import FileType, PlotOutput
from llm_sandbox.exceptions import LanguageNotSupportPlotError
from ... | not re.search(pattern, filtered_code) | added | 13b0b83b8adff299f8d465b4cab73b6987e0ae3ef8b59e7de1dcf63e43ed7f2f | assert|test_get_import_patterns|# ruff: noqa: SLF001, PLR2004 import base64 import io import logging import re import tarfile from unittest.mock import MagicMock, patch import pytest from llm_sandbox.const import SupportedLanguage from llm_sandbox.data import FileType, PlotOutput from llm_sandbox.exceptions import Lang... | null | null | null |
vndee/llm-sandbox | train | 8 | 286151cb2f3dae61934c37e0efa9e5dba025a741 | train | tests/test_security_scanner.py | train | vndee/llm-sandbox:tests/test_security_scanner.py | 713 | 8 | assert | test_web_scraping_suspicious_scenario | """Unit tests for security features with mocked execution.
This module tests security policies and their integration with the code execution pipeline,
using mocked Docker backend to avoid actual code execution.
"""
import pytest
from llm_sandbox import SandboxSession
from llm_sandbox.security import RestrictedModule... | False | added | fa3e1101d674af0d461ac90e717d0da97dbd8d6a92cda6207ef82d8aa8e78c92 | assert|test_web_scraping_suspicious_scenario|"""Unit tests for security features with mocked execution. This module tests security policies and their integration with the code execution pipeline, using mocked Docker backend to avoid actual code execution. """ import pytest from llm_sandbox import SandboxSession from ll... | null | null | null |
vndee/llm-sandbox | train | 8 | 286151cb2f3dae61934c37e0efa9e5dba025a741 | train | tests/test_session.py | train | vndee/llm-sandbox:tests/test_session.py | 117 | 8 | assert | test_init_with_defaults | # ruff: noqa: SLF001, PLR2004
"""Tests for session module."""
from unittest.mock import MagicMock, patch
import pytest
from llm_sandbox.const import SandboxBackend, SupportedLanguage
from llm_sandbox.data import ExecutionResult, FileType, PlotOutput
from llm_sandbox.exceptions import LanguageNotSupportPlotError, Mi... | True | added | e0d3c359c04ee6f3e61c43cc8c72ede98be4b933df15dfc9f708f0b52c8b1ed3 | assert|test_init_with_defaults|# ruff: noqa: SLF001, PLR2004 """Tests for session module.""" from unittest.mock import MagicMock, patch import pytest from llm_sandbox.const import SandboxBackend, SupportedLanguage from llm_sandbox.data import ExecutionResult, FileType, PlotOutput from llm_sandbox.exceptions import Lang... | null | null | null |
vndee/llm-sandbox | train | 9 | a9b6c05a5942282d621ed6b76f6fad2628525434 | train | tests/test_docker.py | val | vndee/llm-sandbox:tests/test_docker.py | 32 | 8 | assert | test_init_with_defaults | # ruff: noqa: SLF001, PLR2004, ARG002, PT011
"""Tests for Docker backend implementation."""
import io
import tarfile
from unittest.mock import MagicMock, Mock, patch
import pytest
from llm_sandbox.const import DefaultImage, SupportedLanguage
from llm_sandbox.data import ConsoleOutput
from llm_sandbox.docker import ... | SupportedLanguage.PYTHON | modified | 8957fdd51b9449224fcd251c231e29ae47e14e8e10f3db23888c15e25f273181 | assert|test_init_with_defaults|# ruff: noqa: SLF001, PLR2004, ARG002, PT011 """Tests for Docker backend implementation.""" import io import tarfile from unittest.mock import MagicMock, Mock, patch import pytest from llm_sandbox.const import DefaultImage, SupportedLanguage from llm_sandbox.data import ConsoleOutput from... | SupportedLanguage.PYTHON | 32 | 8 |
vndee/llm-sandbox | train | 9 | a9b6c05a5942282d621ed6b76f6fad2628525434 | train | tests/test_docker.py | val | vndee/llm-sandbox:tests/test_docker.py | 373 | 12 | assert_* | test_copy_to_runtime | # ruff: noqa: SLF001, PLR2004, ARG002, PT011
"""Tests for Docker backend implementation."""
import io
import tarfile
from unittest.mock import MagicMock, Mock, patch
import pytest
from llm_sandbox.const import DefaultImage, SupportedLanguage
from llm_sandbox.data import ConsoleOutput
from llm_sandbox.docker import ... | ["/container/file.txt"]) | modified | f78eecd22fbd8cf414c0fea9ebc09172b35302d19a956ea30a57d46f474cd496 | assert_*|test_copy_to_runtime|# ruff: noqa: SLF001, PLR2004, ARG002, PT011 """Tests for Docker backend implementation.""" import io import tarfile from unittest.mock import MagicMock, Mock, patch import pytest from llm_sandbox.const import DefaultImage, SupportedLanguage from llm_sandbox.data import ConsoleOutput from ... | ["/container/file.txt"]) | 373 | 12 |
vndee/llm-sandbox | train | 9 | a9b6c05a5942282d621ed6b76f6fad2628525434 | train | tests/test_docker.py | val | vndee/llm-sandbox:tests/test_docker.py | 590 | 16 | assert | test_context_manager | # ruff: noqa: SLF001, PLR2004, ARG002, PT011
"""Tests for Docker backend implementation."""
import io
import tarfile
from unittest.mock import MagicMock, Mock, patch
import pytest
from llm_sandbox.const import DefaultImage, SupportedLanguage
from llm_sandbox.data import ConsoleOutput
from llm_sandbox.docker import ... | session | modified | 83422297af5e93c37fe5f55337ccd5a16ec268a7d1caa5a0405f84dc4d94a928 | assert|test_context_manager|# ruff: noqa: SLF001, PLR2004, ARG002, PT011 """Tests for Docker backend implementation.""" import io import tarfile from unittest.mock import MagicMock, Mock, patch import pytest from llm_sandbox.const import DefaultImage, SupportedLanguage from llm_sandbox.data import ConsoleOutput from ll... | session | 590 | 16 |
vndee/llm-sandbox | train | 9 | a9b6c05a5942282d621ed6b76f6fad2628525434 | train | tests/test_kubernetes.py | train | vndee/llm-sandbox:tests/test_kubernetes.py | 559 | 8 | assert | test_execute_command_success | # ruff: noqa: SLF001, PLR2004, ARG002, PT011
"""Tests for Kubernetes backend implementation."""
import base64
import io
import tarfile
from unittest.mock import MagicMock, Mock, patch
import pytest
from llm_sandbox.const import DefaultImage, SupportedLanguage
from llm_sandbox.data import ConsoleOutput
from llm_sand... | "stdout output" | modified | 88ad7c444cde7b95430710896f1d46f578737bb3d0d11479daf1e1eb31a40584 | assert|test_execute_command_success|# ruff: noqa: SLF001, PLR2004, ARG002, PT011 """Tests for Kubernetes backend implementation.""" import base64 import io import tarfile from unittest.mock import MagicMock, Mock, patch import pytest from llm_sandbox.const import DefaultImage, SupportedLanguage from llm_sandbox.data im... | "stdout output" | 559 | 8 |
vndee/llm-sandbox | train | 9 | a9b6c05a5942282d621ed6b76f6fad2628525434 | train | tests/test_kubernetes.py | train | vndee/llm-sandbox:tests/test_kubernetes.py | 579 | 13 | pytest.raises | test_execute_command_no_container | # ruff: noqa: SLF001, PLR2004, ARG002, PT011
"""Tests for Kubernetes backend implementation."""
import base64
import io
import tarfile
from unittest.mock import MagicMock, Mock, patch
import pytest
from llm_sandbox.const import DefaultImage, SupportedLanguage
from llm_sandbox.data import ConsoleOutput
from llm_sand... | NotOpenSessionError) | modified | 21837615a788b875fffc7755427659a5b75a7d274b4b942441ad58bc65ef0944 | pytest.raises|test_execute_command_no_container|# ruff: noqa: SLF001, PLR2004, ARG002, PT011 """Tests for Kubernetes backend implementation.""" import base64 import io import tarfile from unittest.mock import MagicMock, Mock, patch import pytest from llm_sandbox.const import DefaultImage, SupportedLanguage from llm_san... | NotOpenSessionError) | 579 | 13 |
vndee/llm-sandbox | train | 9 | a9b6c05a5942282d621ed6b76f6fad2628525434 | train | tests/test_podman.py | train | vndee/llm-sandbox:tests/test_podman.py | 58 | 8 | assert | test_init_with_custom_client | # ruff: noqa: SLF001, PLR2004, ARG002, PT011
"""Tests for Podman backend implementation."""
import io
import tarfile
from unittest.mock import MagicMock, Mock, patch
import pytest
from llm_sandbox.const import DefaultImage, SupportedLanguage
from llm_sandbox.data import ConsoleOutput
from llm_sandbox.exceptions imp... | custom_client | modified | 86ae7143a3e3cd34382ade2eec156764533ab26856e9f6281651da6218037bfd | assert|test_init_with_custom_client|# ruff: noqa: SLF001, PLR2004, ARG002, PT011 """Tests for Podman backend implementation.""" import io import tarfile from unittest.mock import MagicMock, Mock, patch import pytest from llm_sandbox.const import DefaultImage, SupportedLanguage from llm_sandbox.data import ConsoleOutput... | custom_client | 58 | 8 |
vndee/llm-sandbox | train | 9 | a9b6c05a5942282d621ed6b76f6fad2628525434 | train | tests/test_podman.py | train | vndee/llm-sandbox:tests/test_podman.py | 100 | 13 | pytest.raises | test_init_with_dockerfile_and_image_raises_error | # ruff: noqa: SLF001, PLR2004, ARG002, PT011
"""Tests for Podman backend implementation."""
import io
import tarfile
from unittest.mock import MagicMock, Mock, patch
import pytest
from llm_sandbox.const import DefaultImage, SupportedLanguage
from llm_sandbox.data import ConsoleOutput
from llm_sandbox.exceptions imp... | ExtraArgumentsError, match="Only one of `image` or `dockerfile` can be provided") | modified | a66cdb0c88f26a3b5593b939f2090372498ceb31f0fdab8b1d3072c38fe4e59a | pytest.raises|test_init_with_dockerfile_and_image_raises_error|# ruff: noqa: SLF001, PLR2004, ARG002, PT011 """Tests for Podman backend implementation.""" import io import tarfile from unittest.mock import MagicMock, Mock, patch import pytest from llm_sandbox.const import DefaultImage, SupportedLanguage from llm_sandbo... | ExtraArgumentsError, match="Only one of `image` or `dockerfile` can be provided") | 100 | 13 |
vndee/llm-sandbox | train | 9 | a9b6c05a5942282d621ed6b76f6fad2628525434 | train | tests/test_podman.py | train | vndee/llm-sandbox:tests/test_podman.py | 625 | 13 | pytest.raises | test_execute_command_no_container | # ruff: noqa: SLF001, PLR2004, ARG002, PT011
"""Tests for Podman backend implementation."""
import io
import tarfile
from unittest.mock import MagicMock, Mock, patch
import pytest
from llm_sandbox.const import DefaultImage, SupportedLanguage
from llm_sandbox.data import ConsoleOutput
from llm_sandbox.exceptions imp... | NotOpenSessionError) | modified | 7e046a41d5a28668833b8a97e6e7dfe2e1237edef15ad6e23c12b5d4a8438a87 | pytest.raises|test_execute_command_no_container|# ruff: noqa: SLF001, PLR2004, ARG002, PT011 """Tests for Podman backend implementation.""" import io import tarfile from unittest.mock import MagicMock, Mock, patch import pytest from llm_sandbox.const import DefaultImage, SupportedLanguage from llm_sandbox.data import C... | NotOpenSessionError) | 625 | 13 |
vndee/llm-sandbox | train | 10 | 5f52ae2b60b8a0d7365b60442a9375632e0f4033 | train | tests/test_docker.py | val | vndee/llm-sandbox:tests/test_docker.py | 397 | 12 | assert_* | test_copy_to_runtime | # ruff: noqa: SLF001, PLR2004, ARG002, PT011
"""Tests for Docker backend implementation."""
import io
import tarfile
import tempfile
from unittest.mock import MagicMock, Mock, patch
import pytest
from llm_sandbox.const import DefaultImage, SupportedLanguage
from llm_sandbox.data import ConsoleOutput
from llm_sandbo... | "mkdir -p '/container'") | added | 212e4c3270198a7f9e60ac6fa002be34ce18ad876c95e3882a22fb42c5a5cd80 | assert_*|test_copy_to_runtime|# ruff: noqa: SLF001, PLR2004, ARG002, PT011 """Tests for Docker backend implementation.""" import io import tarfile import tempfile from unittest.mock import MagicMock, Mock, patch import pytest from llm_sandbox.const import DefaultImage, SupportedLanguage from llm_sandbox.data import Con... | null | null | null |
vndee/llm-sandbox | train | 10 | 5f52ae2b60b8a0d7365b60442a9375632e0f4033 | train | tests/test_docker.py | val | vndee/llm-sandbox:tests/test_docker.py | 542 | 8 | assert | test_execute_command_success_with_stream | # ruff: noqa: SLF001, PLR2004, ARG002, PT011
"""Tests for Docker backend implementation."""
import io
import tarfile
import tempfile
from unittest.mock import MagicMock, Mock, patch
import pytest
from llm_sandbox.const import DefaultImage, SupportedLanguage
from llm_sandbox.data import ConsoleOutput
from llm_sandbo... | "stderr chunk 1stderr chunk 2" | added | 5a8770f214e65838bc7f860e19771dbae11b7e10dcf145410f4d4eaa011ea5db | assert|test_execute_command_success_with_stream|# ruff: noqa: SLF001, PLR2004, ARG002, PT011 """Tests for Docker backend implementation.""" import io import tarfile import tempfile from unittest.mock import MagicMock, Mock, patch import pytest from llm_sandbox.const import DefaultImage, SupportedLanguage from llm_sandb... | null | null | null |
vndee/llm-sandbox | train | 10 | 5f52ae2b60b8a0d7365b60442a9375632e0f4033 | train | tests/test_kubernetes.py | train | vndee/llm-sandbox:tests/test_kubernetes.py | 108 | 8 | assert | test_init_with_custom_pod_manifest | # ruff: noqa: SLF001, PLR2004, ARG002, PT011
"""Tests for Kubernetes backend implementation."""
import base64
import io
import tarfile
from unittest.mock import MagicMock, Mock, patch
import pytest
from llm_sandbox.const import DefaultImage, SupportedLanguage
from llm_sandbox.data import ConsoleOutput
from llm_sand... | session.pod_name.startswith("sandbox-python-") | modified | 790c7a6e8fecac5f5b7120c28ae552eccec94df7996d3358066951c9d8b0e778 | assert|test_init_with_custom_pod_manifest|# ruff: noqa: SLF001, PLR2004, ARG002, PT011 """Tests for Kubernetes backend implementation.""" import base64 import io import tarfile from unittest.mock import MagicMock, Mock, patch import pytest from llm_sandbox.const import DefaultImage, SupportedLanguage from llm_sandbox.d... | "custom-pod" | 107 | 8 |
vndee/llm-sandbox | train | 10 | 5f52ae2b60b8a0d7365b60442a9375632e0f4033 | train | tests/test_kubernetes.py | train | vndee/llm-sandbox:tests/test_kubernetes.py | 319 | 13 | pytest.raises | test_run_without_open_session | # ruff: noqa: SLF001, PLR2004, ARG002, PT011
"""Tests for Kubernetes backend implementation."""
import base64
import io
import tarfile
from unittest.mock import MagicMock, Mock, patch
import pytest
from llm_sandbox.const import DefaultImage, SupportedLanguage
from llm_sandbox.data import ConsoleOutput
from llm_sand... | NotOpenSessionError) | modified | 86f657e4c105033377c471559940040426f2098b3dc3aeab78946db14021c75c | pytest.raises|test_run_without_open_session|# ruff: noqa: SLF001, PLR2004, ARG002, PT011 """Tests for Kubernetes backend implementation.""" import base64 import io import tarfile from unittest.mock import MagicMock, Mock, patch import pytest from llm_sandbox.const import DefaultImage, SupportedLanguage from llm_sandbox... | NotOpenSessionError) | 317 | 13 |
vndee/llm-sandbox | train | 10 | 5f52ae2b60b8a0d7365b60442a9375632e0f4033 | train | tests/test_kubernetes.py | train | vndee/llm-sandbox:tests/test_kubernetes.py | 391 | 12 | assert_* | test_copy_to_runtime | # ruff: noqa: SLF001, PLR2004, ARG002, PT011
"""Tests for Kubernetes backend implementation."""
import base64
import io
import tarfile
from unittest.mock import MagicMock, Mock, patch
import pytest
from llm_sandbox.const import DefaultImage, SupportedLanguage
from llm_sandbox.data import ConsoleOutput
from llm_sand... | ["/pod"]) | added | e64b4af4eb913de5207284917d931ca9c5c015dc3f90c6d8a2ed9ec56af38e1a | assert_*|test_copy_to_runtime|# ruff: noqa: SLF001, PLR2004, ARG002, PT011 """Tests for Kubernetes backend implementation.""" import base64 import io import tarfile from unittest.mock import MagicMock, Mock, patch import pytest from llm_sandbox.const import DefaultImage, SupportedLanguage from llm_sandbox.data import C... | null | null | null |
vndee/llm-sandbox | train | 10 | 5f52ae2b60b8a0d7365b60442a9375632e0f4033 | train | tests/test_podman.py | train | vndee/llm-sandbox:tests/test_podman.py | 179 | 8 | assert | test_open_with_image_pull_single_image | # ruff: noqa: SLF001, PLR2004, ARG002, PT011
"""Tests for Podman backend implementation."""
import io
import tarfile
import tempfile
from unittest.mock import MagicMock, Mock, patch
import pytest
from llm_sandbox.const import DefaultImage, SupportedLanguage
from llm_sandbox.data import ConsoleOutput
from llm_sandbo... | mock_image | modified | 00370639181c8d8741145b981c5878b238bafd68e6745cff986dabf474d581a9 | assert|test_open_with_image_pull_single_image|# ruff: noqa: SLF001, PLR2004, ARG002, PT011 """Tests for Podman backend implementation.""" import io import tarfile import tempfile from unittest.mock import MagicMock, Mock, patch import pytest from llm_sandbox.const import DefaultImage, SupportedLanguage from llm_sandbox... | mock_image | 178 | 8 |
vndee/llm-sandbox | train | 10 | 5f52ae2b60b8a0d7365b60442a9375632e0f4033 | train | tests/test_podman.py | train | vndee/llm-sandbox:tests/test_podman.py | 481 | 13 | pytest.raises | test_copy_to_runtime_no_container | # ruff: noqa: SLF001, PLR2004, ARG002, PT011
"""Tests for Podman backend implementation."""
import io
import tarfile
import tempfile
from unittest.mock import MagicMock, Mock, patch
import pytest
from llm_sandbox.const import DefaultImage, SupportedLanguage
from llm_sandbox.data import ConsoleOutput
from llm_sandbo... | NotOpenSessionError) | added | 7697735e8aff7631a23fc91b5b5fe0ca9bec5626633884a871a2c65bb6943050 | pytest.raises|test_copy_to_runtime_no_container|# ruff: noqa: SLF001, PLR2004, ARG002, PT011 """Tests for Podman backend implementation.""" import io import tarfile import tempfile from unittest.mock import MagicMock, Mock, patch import pytest from llm_sandbox.const import DefaultImage, SupportedLanguage from llm_sandb... | null | null | null |
vndee/llm-sandbox | train | 10 | 5f52ae2b60b8a0d7365b60442a9375632e0f4033 | train | tests/test_podman.py | train | vndee/llm-sandbox:tests/test_podman.py | 635 | 8 | assert | test_execute_command_with_string_chunks | # ruff: noqa: SLF001, PLR2004, ARG002, PT011
"""Tests for Podman backend implementation."""
import io
import tarfile
import tempfile
from unittest.mock import MagicMock, Mock, patch
import pytest
from llm_sandbox.const import DefaultImage, SupportedLanguage
from llm_sandbox.data import ConsoleOutput
from llm_sandbo... | "string stdout" | added | 34b9aa1b9ba91bf6561135f8b22466ef89a41a09ac55ae796a2fb7036719ee32 | assert|test_execute_command_with_string_chunks|# ruff: noqa: SLF001, PLR2004, ARG002, PT011 """Tests for Podman backend implementation.""" import io import tarfile import tempfile from unittest.mock import MagicMock, Mock, patch import pytest from llm_sandbox.const import DefaultImage, SupportedLanguage from llm_sandbo... | null | null | null |
vndee/llm-sandbox | train | 11 | 965d1b2ae2fced0fabd49636c84159c5b8095837 | train | tests/test_base_handler.py | test | vndee/llm-sandbox:tests/test_base_handler.py | 111 | 8 | assert | test_plot_library_enum_coverage | """Tests for llm_sandbox.language_handlers.base module - missing coverage."""
import logging
from unittest.mock import Mock
import pytest
from llm_sandbox.exceptions import CommandFailedError, PackageManagerError
from llm_sandbox.language_handlers.base import AbstractLanguageHandler, LanguageConfig, PlotDetectionCon... | "gruff" | added | 41d337d7063fa551e1ce2658a4acb23c9ea856ea865980aa135c4eeba3ab1dc5 | assert|test_plot_library_enum_coverage|"""Tests for llm_sandbox.language_handlers.base module - missing coverage.""" import logging from unittest.mock import Mock import pytest from llm_sandbox.exceptions import CommandFailedError, PackageManagerError from llm_sandbox.language_handlers.base import AbstractLanguageHandl... | null | null | null |
vndee/llm-sandbox | train | 11 | 965d1b2ae2fced0fabd49636c84159c5b8095837 | train | tests/test_base_session_simple.py | train | vndee/llm-sandbox:tests/test_base_session_simple.py | 52 | 8 | assert | test_default_timeout_fallback | # ruff: noqa: PLR2004, ARG002, SLF001
"""Tests for llm_sandbox.base Session timeout functionality - simplified."""
import time
import pytest
from llm_sandbox.base import Session
from llm_sandbox.data import ConsoleOutput
from llm_sandbox.exceptions import SandboxTimeoutError
class SimpleSession(Session):
"""Co... | 30.0 | added | 12ec0e662e77da959439276671374fbc7efa5103867f0d06bf1128e4b904e68e | assert|test_default_timeout_fallback|# ruff: noqa: PLR2004, ARG002, SLF001 """Tests for llm_sandbox.base Session timeout functionality - simplified.""" import time import pytest from llm_sandbox.base import Session from llm_sandbox.data import ConsoleOutput from llm_sandbox.exceptions import SandboxTimeoutError class S... | null | null | null |
vndee/llm-sandbox | train | 11 | 965d1b2ae2fced0fabd49636c84159c5b8095837 | train | tests/test_const.py | train | vndee/llm-sandbox:tests/test_const.py | 37 | 8 | assert | test_str_enum_string_methods | # ruff: noqa: PLR2004
"""Tests for llm_sandbox.const module."""
import pytest
from llm_sandbox.const import DefaultImage, SandboxBackend, StrEnum, SupportedLanguage
class TestStrEnum:
"""Test StrEnum functionality."""
def test_str_enum_creation(self) -> None:
"""Test basic StrEnum creation."""
... | repr_str | added | 25facc47b163562f6d00f2c4deb6ddcbe804387ed0419bb02c06bc0fa6328a07 | assert|test_str_enum_string_methods|# ruff: noqa: PLR2004 """Tests for llm_sandbox.const module.""" import pytest from llm_sandbox.const import DefaultImage, SandboxBackend, StrEnum, SupportedLanguage class TestStrEnum: """Test StrEnum functionality.""" def test_str_enum_creation(self) -> None: """Test basic StrEnum cr... | null | null | null |
vndee/llm-sandbox | train | 11 | 965d1b2ae2fced0fabd49636c84159c5b8095837 | train | tests/test_data_missing.py | train | vndee/llm-sandbox:tests/test_data_missing.py | 197 | 12 | assert | test_all_file_types_exist | # ruff: noqa: PLR2004
"""Additional tests for llm_sandbox.data module to improve coverage."""
import warnings
from llm_sandbox.data import ConsoleOutput, ExecutionResult, FileType, PlotOutput
class TestConsoleOutputMissingMethods:
"""Test ConsoleOutput methods that are missing coverage."""
def test_console... | value | added | 0b1973545226728249156f309575934cda12dc3ff7d93fb1bc9fc990ad201196 | assert|test_all_file_types_exist|# ruff: noqa: PLR2004 """Additional tests for llm_sandbox.data module to improve coverage.""" import warnings from llm_sandbox.data import ConsoleOutput, ExecutionResult, FileType, PlotOutput class TestConsoleOutputMissingMethods: """Test ConsoleOutput methods that are missing coverage.... | null | null | null |
vndee/llm-sandbox | train | 11 | 965d1b2ae2fced0fabd49636c84159c5b8095837 | train | tests/test_exceptions.py | train | vndee/llm-sandbox:tests/test_exceptions.py | 154 | 8 | assert | test_command_failed_error | # ruff: noqa: PLR2004
"""Tests for llm_sandbox.exceptions module."""
from llm_sandbox.exceptions import (
CommandEmptyError,
CommandFailedError,
ContainerError,
ExtraArgumentsError,
ImageNotFoundError,
ImagePullError,
InvalidRegexPatternError,
LanguageHandlerNotInitializedError,
Lan... | isinstance(error, SandboxError) | added | 0740cf8ff6623097198c74b966006af69c463839b3e635a63c8f33b325f57617 | assert|test_command_failed_error|# ruff: noqa: PLR2004 """Tests for llm_sandbox.exceptions module.""" from llm_sandbox.exceptions import ( CommandEmptyError, CommandFailedError, ContainerError, ExtraArgumentsError, ImageNotFoundError, ImagePullError, InvalidRegexPatternError, LanguageHandlerNotInitializedError, Languag... | null | null | null |
vndee/llm-sandbox | train | 11 | 965d1b2ae2fced0fabd49636c84159c5b8095837 | train | tests/test_kubernetes.py | train | vndee/llm-sandbox:tests/test_kubernetes.py | 586 | 13 | pytest.raises | test_execute_command_no_container | # ruff: noqa: SLF001, PLR2004, ARG002, PT011
"""Tests for Kubernetes backend implementation."""
import base64
import io
import tarfile
from unittest.mock import MagicMock, Mock, patch
import pytest
from llm_sandbox.const import DefaultImage, SupportedLanguage
from llm_sandbox.data import ConsoleOutput
from llm_sand... | NotOpenSessionError) | modified | cfb7d0bfba61d41a2c9ee26c9f3de49e345d756fda686807c3a852affb2ef5ea | pytest.raises|test_execute_command_no_container|# ruff: noqa: SLF001, PLR2004, ARG002, PT011 """Tests for Kubernetes backend implementation.""" import base64 import io import tarfile from unittest.mock import MagicMock, Mock, patch import pytest from llm_sandbox.const import DefaultImage, SupportedLanguage from llm_san... | NotOpenSessionError) | 586 | 13 |
vndee/llm-sandbox | train | 11 | 965d1b2ae2fced0fabd49636c84159c5b8095837 | train | tests/test_podman.py | train | vndee/llm-sandbox:tests/test_podman.py | 789 | 8 | assert_* | test_ensure_ownership_with_non_root_user | # ruff: noqa: SLF001, PLR2004, ARG002, PT011
"""Tests for Podman backend implementation."""
import io
import tarfile
import tempfile
from unittest.mock import MagicMock, Mock, patch
import pytest
from llm_sandbox.const import DefaultImage, SupportedLanguage
from llm_sandbox.data import ConsoleOutput
from llm_sandbo... | "chown -R 1000:1000 /tmp/test /tmp/test2") | modified | ac6e779acbc5b8211762ca3f14d1f15806d587584596220c3a48146c7bdc37f2 | assert_*|test_ensure_ownership_with_non_root_user|# ruff: noqa: SLF001, PLR2004, ARG002, PT011 """Tests for Podman backend implementation.""" import io import tarfile import tempfile from unittest.mock import MagicMock, Mock, patch import pytest from llm_sandbox.const import DefaultImage, SupportedLanguage from llm_san... | "chown -R 1000:1000 /tmp/test /tmp/test2") | 788 | 8 |
vndee/llm-sandbox | train | 11 | 965d1b2ae2fced0fabd49636c84159c5b8095837 | train | tests/test_security_missing.py | train | vndee/llm-sandbox:tests/test_security_missing.py | 243 | 8 | assert | test_security_policy_immutability_after_pydantic_validation | # ruff: noqa: PLR2004, ARG002, SLF001
"""Additional tests for llm_sandbox.security module to improve coverage."""
import re
import pytest
from llm_sandbox.exceptions import InvalidRegexPatternError
from llm_sandbox.security import RestrictedModule, SecurityIssueSeverity, SecurityPattern, SecurityPolicy
class TestS... | None | added | 448443b3cef7789be9eb25f8f9c524b3ab519a912bd7d82f35b8329becebe8a7 | assert|test_security_policy_immutability_after_pydantic_validation|# ruff: noqa: PLR2004, ARG002, SLF001 """Additional tests for llm_sandbox.security module to improve coverage.""" import re import pytest from llm_sandbox.exceptions import InvalidRegexPatternError from llm_sandbox.security import RestrictedModule, Secu... | null | null | null |
vndee/llm-sandbox | train | 12 | 99d8836e686f6453cab8fa8e3d0d60412dd394ca | train | tests/test_docker.py | val | vndee/llm-sandbox:tests/test_docker.py | 40 | 8 | assert | test_init_with_defaults | # ruff: noqa: SLF001, PLR2004, ARG002, PT011
"""Tests for Docker backend implementation."""
import io
import tarfile
import tempfile
from unittest.mock import MagicMock, Mock, patch
import pytest
from pydantic_core import ValidationError
from llm_sandbox.const import DefaultImage, SupportedLanguage
from llm_sandbox... | "/sandbox" | added | 1a441d74999186b32f9f3577200af13bfc37845244993f904ad45fa0a225b3ff | assert|test_init_with_defaults|# ruff: noqa: SLF001, PLR2004, ARG002, PT011 """Tests for Docker backend implementation.""" import io import tarfile import tempfile from unittest.mock import MagicMock, Mock, patch import pytest from pydantic_core import ValidationError from llm_sandbox.const import DefaultImage, Support... | null | null | null |
vndee/llm-sandbox | train | 12 | 99d8836e686f6453cab8fa8e3d0d60412dd394ca | train | tests/test_kubernetes.py | train | vndee/llm-sandbox:tests/test_kubernetes.py | 54 | 8 | assert | test_init_with_custom_client | # ruff: noqa: SLF001, PLR2004, ARG002, PT011
"""Tests for Kubernetes backend implementation."""
import io
import tarfile
import tempfile
from unittest.mock import MagicMock, Mock, patch
import pytest
from llm_sandbox.const import DefaultImage, SupportedLanguage
from llm_sandbox.data import ConsoleOutput
from llm_sa... | custom_client | modified | a4c0e06caa85973ca47d88e2bfb19d0fa0fd54a9baa5755f7212579d775f1c6f | assert|test_init_with_custom_client|# ruff: noqa: SLF001, PLR2004, ARG002, PT011 """Tests for Kubernetes backend implementation.""" import io import tarfile import tempfile from unittest.mock import MagicMock, Mock, patch import pytest from llm_sandbox.const import DefaultImage, SupportedLanguage from llm_sandbox.data ... | custom_client | 54 | 8 |
vndee/llm-sandbox | train | 12 | 99d8836e686f6453cab8fa8e3d0d60412dd394ca | train | tests/test_micromamba.py | val | vndee/llm-sandbox:tests/test_micromamba.py | 104 | 8 | assert | test_init_with_all_docker_session_params | # ruff: noqa: SLF001, PLR2004, ARG002
"""Tests for Micromamba backend implementation."""
from unittest.mock import MagicMock, patch
import pytest
from llm_sandbox.const import SupportedLanguage
from llm_sandbox.micromamba import MicromambaSession
from llm_sandbox.security import SecurityPolicy
class TestMicromamb... | "1g" | added | 9e2a750efe5416a114ee1b4243fcfaf91b7ff12529fd563e4828d074200efd38 | assert|test_init_with_all_docker_session_params|# ruff: noqa: SLF001, PLR2004, ARG002 """Tests for Micromamba backend implementation.""" from unittest.mock import MagicMock, patch import pytest from llm_sandbox.const import SupportedLanguage from llm_sandbox.micromamba import MicromambaSession from llm_sandbox.security... | null | null | null |
vndee/llm-sandbox | train | 12 | 99d8836e686f6453cab8fa8e3d0d60412dd394ca | train | tests/test_mixins.py | train | vndee/llm-sandbox:tests/test_mixins.py | 164 | 13 | pytest.raises | test_copy_from_runtime_no_container | # ruff: noqa: SLF001, PLR2004, ARG002, PT011
"""Test cases for the new architecture mixins."""
import io
import signal
import tarfile
import time
from pathlib import Path
from unittest.mock import MagicMock, Mock, patch
import pytest
from llm_sandbox.core.mixins import CommandExecutionMixin, FileOperationsMixin, Ti... | NotOpenSessionError) | added | 188f75ca1c7b227bf18876bd1c37a7f7a81e1cb6bd52f461c86e6832388caa0b | pytest.raises|test_copy_from_runtime_no_container|# ruff: noqa: SLF001, PLR2004, ARG002, PT011 """Test cases for the new architecture mixins.""" import io import signal import tarfile import time from pathlib import Path from unittest.mock import MagicMock, Mock, patch import pytest from llm_sandbox.core.mixins import ... | null | null | null |
vndee/llm-sandbox | train | 12 | 99d8836e686f6453cab8fa8e3d0d60412dd394ca | train | tests/test_podman.py | train | vndee/llm-sandbox:tests/test_podman.py | 252 | 13 | pytest.raises | test_copy_to_runtime_no_container | # ruff: noqa: SLF001, PLR2004, ARG002, PT011
"""Tests for Podman backend implementation."""
from unittest.mock import MagicMock, Mock, patch
import pytest
from pydantic_core import ValidationError
from llm_sandbox.const import SupportedLanguage
from llm_sandbox.data import ConsoleOutput
from llm_sandbox.exceptions ... | NotOpenSessionError) | added | 0c53645aafa4ccaaf2fca006e7fe22fd1ce855bb9b34df97fe5717f06e43101e | pytest.raises|test_copy_to_runtime_no_container|# ruff: noqa: SLF001, PLR2004, ARG002, PT011 """Tests for Podman backend implementation.""" from unittest.mock import MagicMock, Mock, patch import pytest from pydantic_core import ValidationError from llm_sandbox.const import SupportedLanguage from llm_sandbox.data impor... | null | null | null |
vndee/llm-sandbox | train | 12 | 99d8836e686f6453cab8fa8e3d0d60412dd394ca | train | tests/test_security_policy.py | train | vndee/llm-sandbox:tests/test_security_policy.py | 200 | 12 | assert | test_add_restricted_module_to_policy | # ruff: noqa: PLR2004
"""Unit tests for the security features in LLM Sandbox.
This module contains comprehensive unit tests for the security policy system,
including pattern matching, dangerous module detection, and policy enforcement.
"""
import re
import pytest
from llm_sandbox.exceptions import InvalidRegexPatt... | "subprocess" | added | b728642036729f2e038a564d343efd64bf02c6daad49f7db0237be5be3ba47b8 | assert|test_add_restricted_module_to_policy|# ruff: noqa: PLR2004 """Unit tests for the security features in LLM Sandbox. This module contains comprehensive unit tests for the security policy system, including pattern matching, dangerous module detection, and policy enforcement. """ import re import pytest from llm_san... | null | null | null |
vndee/llm-sandbox | train | 12 | 99d8836e686f6453cab8fa8e3d0d60412dd394ca | train | tests/test_security_scanner.py | train | vndee/llm-sandbox:tests/test_security_scanner.py | 558 | 8 | assert | test_safe_library_usage_pandas | # ruff: noqa: E501, SLF001, ARG002, PLR2004, FBT003
"""Unit tests for security features with mocked execution.
This module tests security policies and their integration with the code execution pipeline,
using mocked Docker backend to avoid actual code execution.
"""
import pytest
from llm_sandbox import SandboxSessi... | True | modified | 04b2a33147ffb78a24c659851cfd0d2aedccff6eec81e2838d829637d3678f9f | assert|test_safe_library_usage_pandas|# ruff: noqa: E501, SLF001, ARG002, PLR2004, FBT003 """Unit tests for security features with mocked execution. This module tests security policies and their integration with the code execution pipeline, using mocked Docker backend to avoid actual code execution. """ import pytest f... | True | 557 | 8 |
vndee/llm-sandbox | train | 12 | 99d8836e686f6453cab8fa8e3d0d60412dd394ca | train | tests/test_session_base.py | train | vndee/llm-sandbox:tests/test_session_base.py | 419 | 8 | assert | test_execute_commands_tuple_commands | # ruff: noqa: E501, SLF001, ARG002, PLR2004, FBT003
"""Test cases for the new architecture BaseSession."""
import logging
import threading
import time
from typing import Any
from unittest.mock import MagicMock, Mock, call, patch
import pytest
from llm_sandbox.const import SupportedLanguage
from llm_sandbox.core.conf... | "output2" | added | 30dc22eb802325ede114d732654ef6e4f82bb813eeedf1dc7cee122b8e570db1 | assert|test_execute_commands_tuple_commands|# ruff: noqa: E501, SLF001, ARG002, PLR2004, FBT003 """Test cases for the new architecture BaseSession.""" import logging import threading import time from typing import Any from unittest.mock import MagicMock, Mock, call, patch import pytest from llm_sandbox.const import Sup... | null | null | null |
vndee/llm-sandbox | train | 13 | 195375f60ca0f3038897ae1db745c127a372ed03 | train | tests/test_const.py | train | vndee/llm-sandbox:tests/test_const.py | 151 | 8 | assert | test_default_image_access | # ruff: noqa: PLR2004
"""Tests for llm_sandbox.const module."""
import pytest
from llm_sandbox.const import DefaultImage, SandboxBackend, StrEnum, SupportedLanguage
class TestStrEnum:
"""Test StrEnum functionality."""
def test_str_enum_creation(self) -> None:
"""Test basic StrEnum creation."""
... | hasattr(image_instance, "JAVA") | modified | 7fe2b1fc155d3a5853df8f87bfea9119169db4439e907d1c1daa83d2f46b3cb2 | assert|test_default_image_access|# ruff: noqa: PLR2004 """Tests for llm_sandbox.const module.""" import pytest from llm_sandbox.const import DefaultImage, SandboxBackend, StrEnum, SupportedLanguage class TestStrEnum: """Test StrEnum functionality.""" def test_str_enum_creation(self) -> None: """Test basic StrEnum creat... | hasattr(image_instance, "JAVA") | 151 | 8 |
vndee/llm-sandbox | train | 13 | 195375f60ca0f3038897ae1db745c127a372ed03 | train | tests/test_const.py | train | vndee/llm-sandbox:tests/test_const.py | 240 | 8 | assert | test_enum_equality | # ruff: noqa: PLR2004
"""Tests for llm_sandbox.const module."""
import pytest
from llm_sandbox.const import DefaultImage, SandboxBackend, StrEnum, SupportedLanguage
class TestStrEnum:
"""Test StrEnum functionality."""
def test_str_enum_creation(self) -> None:
"""Test basic StrEnum creation."""
... | "kubernetes" | modified | f06789f36d10c25a59cd2ac7045e861abd400b411bba2fa1adf5a24c8c742918 | assert|test_enum_equality|# ruff: noqa: PLR2004 """Tests for llm_sandbox.const module.""" import pytest from llm_sandbox.const import DefaultImage, SandboxBackend, StrEnum, SupportedLanguage class TestStrEnum: """Test StrEnum functionality.""" def test_str_enum_creation(self) -> None: """Test basic StrEnum creation."""... | "kubernetes" | 241 | 8 |
vndee/llm-sandbox | train | 13 | 195375f60ca0f3038897ae1db745c127a372ed03 | train | tests/test_exceptions.py | train | vndee/llm-sandbox:tests/test_exceptions.py | 264 | 8 | assert | test_sandbox_timeout_error_with_duration | # ruff: noqa: PLR2004
"""Tests for llm_sandbox.exceptions module."""
from llm_sandbox.exceptions import (
CommandEmptyError,
CommandFailedError,
ContainerError,
ExtraArgumentsError,
ImageNotFoundError,
ImagePullError,
InvalidRegexPatternError,
LanguageHandlerNotInitializedError,
Lan... | None | modified | 17cc8962bd6f38cf4e6533c0209f2826b76c01f7c55e15b673ce88c4294c346a | assert|test_sandbox_timeout_error_with_duration|# ruff: noqa: PLR2004 """Tests for llm_sandbox.exceptions module.""" from llm_sandbox.exceptions import ( CommandEmptyError, CommandFailedError, ContainerError, ExtraArgumentsError, ImageNotFoundError, ImagePullError, InvalidRegexPatternError, LanguageHandlerNotInitialize... | 30.0 | 264 | 8 |
vndee/llm-sandbox | train | 13 | 195375f60ca0f3038897ae1db745c127a372ed03 | train | tests/test_exceptions.py | train | vndee/llm-sandbox:tests/test_exceptions.py | 389 | 8 | assert | test_command_failed_error_formatting | # ruff: noqa: PLR2004
"""Tests for llm_sandbox.exceptions module."""
from llm_sandbox.exceptions import (
CommandEmptyError,
CommandFailedError,
ContainerError,
ExtraArgumentsError,
ImageNotFoundError,
ImagePullError,
InvalidRegexPatternError,
LanguageHandlerNotInitializedError,
Lan... | message | modified | 1960c0855402bbbd72bc1b84f8c3cd9d5acc29d127a37a67257ee31e5cf53f7b | assert|test_command_failed_error_formatting|# ruff: noqa: PLR2004 """Tests for llm_sandbox.exceptions module.""" from llm_sandbox.exceptions import ( CommandEmptyError, CommandFailedError, ContainerError, ExtraArgumentsError, ImageNotFoundError, ImagePullError, InvalidRegexPatternError, LanguageHandlerNotInitializedErr... | message | 387 | 8 |
vndee/llm-sandbox | train | 13 | 195375f60ca0f3038897ae1db745c127a372ed03 | train | tests/test_security_policy.py | train | vndee/llm-sandbox:tests/test_security_policy.py | 157 | 8 | assert | test_policy_with_patterns_and_modules | # ruff: noqa: PLR2004
"""Unit tests for the security features in LLM Sandbox.
This module contains comprehensive unit tests for the security policy system,
including pattern matching, dangerous module detection, and policy enforcement.
"""
import re
import pytest
from llm_sandbox.exceptions import InvalidRegexPatt... | SecurityIssueSeverity.LOW | modified | 99f3511674bd4793a2e7703332395395fd9228c03e4f7b574a624a122962b703 | assert|test_policy_with_patterns_and_modules|# ruff: noqa: PLR2004 """Unit tests for the security features in LLM Sandbox. This module contains comprehensive unit tests for the security policy system, including pattern matching, dangerous module detection, and policy enforcement. """ import re import pytest from llm_sa... | SecurityIssueSeverity.LOW | 158 | 8 |
vndee/llm-sandbox | train | 13 | 195375f60ca0f3038897ae1db745c127a372ed03 | train | tests/test_security_policy.py | train | vndee/llm-sandbox:tests/test_security_policy.py | 328 | 8 | assert | test_module_severity_filtering | # ruff: noqa: PLR2004
"""Unit tests for the security features in LLM Sandbox.
This module contains comprehensive unit tests for the security policy system,
including pattern matching, dangerous module detection, and policy enforcement.
"""
import re
import pytest
from llm_sandbox.exceptions import InvalidRegexPatt... | all(m.name in ["os", "subprocess"] for m in high_severity_modules) | modified | 3573d914ce5b95b6d98f83f700e5783ea6de6563697b7be4a6e0e86119cd121d | assert|test_module_severity_filtering|# ruff: noqa: PLR2004 """Unit tests for the security features in LLM Sandbox. This module contains comprehensive unit tests for the security policy system, including pattern matching, dangerous module detection, and policy enforcement. """ import re import pytest from llm_sandbox.e... | all(m.name in ["os", "subprocess"] for m in high_severity_modules) | 329 | 8 |
vndee/llm-sandbox | train | 13 | 195375f60ca0f3038897ae1db745c127a372ed03 | train | tests/test_security_scanner.py | train | vndee/llm-sandbox:tests/test_security_scanner.py | 373 | 8 | assert | test_safe_level_allows_everything | # ruff: noqa: E501, SLF001, ARG002, PLR2004, FBT003
"""Unit tests for security features with mocked execution.
This module tests security policies and their integration with the code execution pipeline,
using mocked Docker backend to avoid actual code execution.
"""
import pytest
from llm_sandbox import SandboxSessi... | True | added | a3475bda2ece80dbd04e80852f84a57069f8ac1d66b00f744e70448cd4bdce09 | assert|test_safe_level_allows_everything|# ruff: noqa: E501, SLF001, ARG002, PLR2004, FBT003 """Unit tests for security features with mocked execution. This module tests security policies and their integration with the code execution pipeline, using mocked Docker backend to avoid actual code execution. """ import pytes... | null | null | null |
vndee/llm-sandbox | train | 13 | 195375f60ca0f3038897ae1db745c127a372ed03 | train | tests/test_security_scanner.py | train | vndee/llm-sandbox:tests/test_security_scanner.py | 690 | 8 | assert | test_process_information_gathering | # ruff: noqa: E501, SLF001, ARG002, PLR2004, FBT003
"""Unit tests for security features with mocked execution.
This module tests security policies and their integration with the code execution pipeline,
using mocked Docker backend to avoid actual code execution.
"""
import pytest
from llm_sandbox import SandboxSessi... | any(v.description == "Subprocess execution" for v in violations) | added | 70fc9ba7d84f2e5ddf45bb3afd088b8fe0b7ec94b21dc32b2a0da0f8ee2a28a4 | assert|test_process_information_gathering|# ruff: noqa: E501, SLF001, ARG002, PLR2004, FBT003 """Unit tests for security features with mocked execution. This module tests security policies and their integration with the code execution pipeline, using mocked Docker backend to avoid actual code execution. """ import pyte... | null | null | null |
vndee/llm-sandbox | train | 14 | 2bcfc5f0da5181e00d6d9eb7298722ee41b460bc | train | tests/test_advanced_security_scenarios.py | train | vndee/llm-sandbox:tests/test_advanced_security_scenarios.py | 452 | 8 | assert | test_exec_function_detection | # ruff: noqa: PLR2004
"""Advanced security scenario tests converted from examples.
This module contains comprehensive security tests that simulate real-world
attack patterns and edge cases to thoroughly validate the security system.
"""
from dataclasses import dataclass
from typing import Any
import pytest
from llm... | False | added | fd7d5db395ca1a350075746d32c31ca4d01179458e315c18d8c6e43c3a8c5f8a | assert|test_exec_function_detection|# ruff: noqa: PLR2004 """Advanced security scenario tests converted from examples. This module contains comprehensive security tests that simulate real-world attack patterns and edge cases to thoroughly validate the security system. """ from dataclasses import dataclass from typing i... | null | null | null |
vndee/llm-sandbox | train | 14 | 2bcfc5f0da5181e00d6d9eb7298722ee41b460bc | train | tests/test_advanced_security_scenarios.py | train | vndee/llm-sandbox:tests/test_advanced_security_scenarios.py | 498 | 8 | assert | test_file_system_traversal_attack | # ruff: noqa: PLR2004
"""Advanced security scenario tests converted from examples.
This module contains comprehensive security tests that simulate real-world
attack patterns and edge cases to thoroughly validate the security system.
"""
from dataclasses import dataclass
from typing import Any
import pytest
from llm... | False | added | 7d5a3f235223bb6f719704569d5a19c58d5018168e3d49f5cd6df0d134be47c4 | assert|test_file_system_traversal_attack|# ruff: noqa: PLR2004 """Advanced security scenario tests converted from examples. This module contains comprehensive security tests that simulate real-world attack patterns and edge cases to thoroughly validate the security system. """ from dataclasses import dataclass from typ... | null | null | null |
vndee/llm-sandbox | train | 14 | 2bcfc5f0da5181e00d6d9eb7298722ee41b460bc | train | tests/test_advanced_security_scenarios.py | train | vndee/llm-sandbox:tests/test_advanced_security_scenarios.py | 684 | 8 | assert | test_process_injection | # ruff: noqa: PLR2004
"""Advanced security scenario tests converted from examples.
This module contains comprehensive security tests that simulate real-world
attack patterns and edge cases to thoroughly validate the security system.
"""
from dataclasses import dataclass
from typing import Any
import pytest
from llm... | False | added | cd7c6e28b856b209416303a0edfa7aa682e0703414fb818084ed9af96a3003f1 | assert|test_process_injection|# ruff: noqa: PLR2004 """Advanced security scenario tests converted from examples. This module contains comprehensive security tests that simulate real-world attack patterns and edge cases to thoroughly validate the security system. """ from dataclasses import dataclass from typing import ... | null | null | null |
vndee/llm-sandbox | train | 14 | 2bcfc5f0da5181e00d6d9eb7298722ee41b460bc | train | tests/test_advanced_security_scenarios.py | train | vndee/llm-sandbox:tests/test_advanced_security_scenarios.py | 794 | 8 | assert | test_function_pointer_indirection | # ruff: noqa: PLR2004
"""Advanced security scenario tests converted from examples.
This module contains comprehensive security tests that simulate real-world
attack patterns and edge cases to thoroughly validate the security system.
"""
from dataclasses import dataclass
from typing import Any
import pytest
from llm... | False | added | 3acadf1dcf8016b75dc78c01e108aa309333696671f5d13a3695f8b12699ad14 | assert|test_function_pointer_indirection|# ruff: noqa: PLR2004 """Advanced security scenario tests converted from examples. This module contains comprehensive security tests that simulate real-world attack patterns and edge cases to thoroughly validate the security system. """ from dataclasses import dataclass from typ... | null | null | null |
vndee/llm-sandbox | train | 15 | 05c0053b0268b04a3fa049ca424215bb08bbcb9c | train | tests/test_kubernetes.py | train | vndee/llm-sandbox:tests/test_kubernetes.py | 167 | 8 | assert | test_open_success | # ruff: noqa: SLF001, PLR2004, ARG002, PT011, PT012
"""Tests for Kubernetes backend implementation."""
import io
import tarfile
import tempfile
from unittest.mock import MagicMock, Mock, patch
import pytest
from llm_sandbox.const import DefaultImage, SupportedLanguage
from llm_sandbox.data import ConsoleOutput
from... | session.pod_name | modified | d8029d86427592c284f842e8662a705cd374cce29f9940effdd583c1e7afcb9e | assert|test_open_success|# ruff: noqa: SLF001, PLR2004, ARG002, PT011, PT012 """Tests for Kubernetes backend implementation.""" import io import tarfile import tempfile from unittest.mock import MagicMock, Mock, patch import pytest from llm_sandbox.const import DefaultImage, SupportedLanguage from llm_sandbox.data impo... | session.pod_name | 167 | 8 |
vndee/llm-sandbox | train | 15 | 05c0053b0268b04a3fa049ca424215bb08bbcb9c | train | tests/test_kubernetes.py | train | vndee/llm-sandbox:tests/test_kubernetes.py | 640 | 13 | pytest.raises | test_get_archive_no_container | # ruff: noqa: SLF001, PLR2004, ARG002, PT011, PT012
"""Tests for Kubernetes backend implementation."""
import io
import tarfile
import tempfile
from unittest.mock import MagicMock, Mock, patch
import pytest
from llm_sandbox.const import DefaultImage, SupportedLanguage
from llm_sandbox.data import ConsoleOutput
from... | NotOpenSessionError) | modified | 4e955c7ed4697b2321eb3906c5929a5b7a9c64c85a88c84d325c295699ed72e8 | pytest.raises|test_get_archive_no_container|# ruff: noqa: SLF001, PLR2004, ARG002, PT011, PT012 """Tests for Kubernetes backend implementation.""" import io import tarfile import tempfile from unittest.mock import MagicMock, Mock, patch import pytest from llm_sandbox.const import DefaultImage, SupportedLanguage from ll... | NotOpenSessionError) | 640 | 13 |
vndee/llm-sandbox | train | 15 | 05c0053b0268b04a3fa049ca424215bb08bbcb9c | train | tests/test_kubernetes.py | train | vndee/llm-sandbox:tests/test_kubernetes.py | 976 | 13 | pytest.raises | test_copy_to_container_file_not_found | # ruff: noqa: SLF001, PLR2004, ARG002, PT011, PT012
"""Tests for Kubernetes backend implementation."""
import io
import tarfile
import tempfile
from unittest.mock import MagicMock, Mock, patch
import pytest
from llm_sandbox.const import DefaultImage, SupportedLanguage
from llm_sandbox.data import ConsoleOutput
from... | FileNotFoundError, match="does not exist") | added | 004dd2db587b61cef93956417d5dc288645267af0676dca154f8584366dca636 | pytest.raises|test_copy_to_container_file_not_found|# ruff: noqa: SLF001, PLR2004, ARG002, PT011, PT012 """Tests for Kubernetes backend implementation.""" import io import tarfile import tempfile from unittest.mock import MagicMock, Mock, patch import pytest from llm_sandbox.const import DefaultImage, SupportedLanguage... | null | null | null |
vndee/llm-sandbox | train | 15 | 05c0053b0268b04a3fa049ca424215bb08bbcb9c | train | tests/test_kubernetes.py | train | vndee/llm-sandbox:tests/test_kubernetes.py | 1,596 | 8 | assert | test_init_with_security_policy | # ruff: noqa: SLF001, PLR2004, ARG002, PT011, PT012
"""Tests for Kubernetes backend implementation."""
import io
import tarfile
import tempfile
from unittest.mock import MagicMock, Mock, patch
import pytest
from llm_sandbox.const import DefaultImage, SupportedLanguage
from llm_sandbox.data import ConsoleOutput
from... | security_policy | added | d816645175d190b4798cf6ab21c057b0041eb7a1ffc6a269d94ef21439ab96f8 | assert|test_init_with_security_policy|# ruff: noqa: SLF001, PLR2004, ARG002, PT011, PT012 """Tests for Kubernetes backend implementation.""" import io import tarfile import tempfile from unittest.mock import MagicMock, Mock, patch import pytest from llm_sandbox.const import DefaultImage, SupportedLanguage from llm_sand... | null | null | null |
vndee/llm-sandbox | train | 16 | 8fb015ca2d590e2ca7f50ebed4c76465eecc4bc6 | train | tests/test_docker.py | val | vndee/llm-sandbox:tests/test_docker.py | 223 | 8 | assert | test_open_with_dockerfile | # ruff: noqa: SLF001, PLR2004, ARG002, PT011
"""Tests for Docker backend implementation."""
import io
import tarfile
import tempfile
from collections.abc import Generator
from unittest.mock import MagicMock, Mock, patch
import pytest
from pydantic_core import ValidationError
from llm_sandbox.const import DefaultIma... | True | modified | 332a89118180fb2a92819d02394cde28b73a6bfc49cd711bcd83eeadf223d015 | assert|test_open_with_dockerfile|# ruff: noqa: SLF001, PLR2004, ARG002, PT011 """Tests for Docker backend implementation.""" import io import tarfile import tempfile from collections.abc import Generator from unittest.mock import MagicMock, Mock, patch import pytest from pydantic_core import ValidationError from llm_sa... | True | 222 | 8 |
vndee/llm-sandbox | train | 16 | 8fb015ca2d590e2ca7f50ebed4c76465eecc4bc6 | train | tests/test_docker.py | val | vndee/llm-sandbox:tests/test_docker.py | 482 | 12 | assert_* | test_copy_from_runtime | # ruff: noqa: SLF001, PLR2004, ARG002, PT011
"""Tests for Docker backend implementation."""
import io
import tarfile
import tempfile
from collections.abc import Generator
from unittest.mock import MagicMock, Mock, patch
import pytest
from pydantic_core import ValidationError
from llm_sandbox.const import DefaultIma... | "/container/file.txt") | modified | ab5699f9cb3d57eb607e4f4a9faffaf511e6de435f8cec265dd0003a05a1e474 | assert_*|test_copy_from_runtime|# ruff: noqa: SLF001, PLR2004, ARG002, PT011 """Tests for Docker backend implementation.""" import io import tarfile import tempfile from collections.abc import Generator from unittest.mock import MagicMock, Mock, patch import pytest from pydantic_core import ValidationError from llm_san... | "/container/file.txt") | 481 | 12 |
vndee/llm-sandbox | train | 16 | 8fb015ca2d590e2ca7f50ebed4c76465eecc4bc6 | train | tests/test_docker.py | val | vndee/llm-sandbox:tests/test_docker.py | 864 | 8 | assert_* | test_copy_from_container | # ruff: noqa: SLF001, PLR2004, ARG002, PT011
"""Tests for Docker backend implementation."""
import io
import tarfile
import tempfile
from collections.abc import Generator
from unittest.mock import MagicMock, Mock, patch
import pytest
from pydantic_core import ValidationError
from llm_sandbox.const import DefaultIma... | "/container/file.txt") | added | 8bd4fa0524b84964016551604797a6d9feb20b1de20b15b5cbe1a7ceaf6084cb | assert_*|test_copy_from_container|# ruff: noqa: SLF001, PLR2004, ARG002, PT011 """Tests for Docker backend implementation.""" import io import tarfile import tempfile from collections.abc import Generator from unittest.mock import MagicMock, Mock, patch import pytest from pydantic_core import ValidationError from llm_s... | null | null | null |
vndee/llm-sandbox | train | 16 | 8fb015ca2d590e2ca7f50ebed4c76465eecc4bc6 | train | tests/test_docker.py | val | vndee/llm-sandbox:tests/test_docker.py | 897 | 8 | assert | test_init_with_deprecated_mounts_parameter_single_mount | # ruff: noqa: SLF001, PLR2004, ARG002, PT011
"""Tests for Docker backend implementation."""
import io
import tarfile
import tempfile
from collections.abc import Generator
from unittest.mock import MagicMock, Mock, patch
import pytest
from pydantic_core import ValidationError
from llm_sandbox.const import DefaultIma... | session.config.runtime_configs | added | 9ba70d6f6b224fff3cd59ce78ace4acaa1f4ab2ba3f1ef85e1945d7853dab48c | assert|test_init_with_deprecated_mounts_parameter_single_mount|# ruff: noqa: SLF001, PLR2004, ARG002, PT011 """Tests for Docker backend implementation.""" import io import tarfile import tempfile from collections.abc import Generator from unittest.mock import MagicMock, Mock, patch import pytest from pydantic_core impo... | null | null | null |
vndee/llm-sandbox | train | 17 | 5a64c184212e58afed15faba07540e45f0a2bcf6 | train | tests/test_docker.py | val | vndee/llm-sandbox:tests/test_docker.py | 482 | 12 | assert_* | test_copy_from_runtime | # ruff: noqa: SLF001, PLR2004, ARG002, PT011
"""Tests for Docker backend implementation."""
import io
import tarfile
import tempfile
from collections.abc import Generator
from unittest.mock import MagicMock, Mock, patch
import pytest
from pydantic_core import ValidationError
from llm_sandbox.const import DefaultIma... | "/container/file.txt") | modified | 6b95b745988473dbb6663140908840745f1a34a41c090c991d07d455c2862ea0 | assert_*|test_copy_from_runtime|# ruff: noqa: SLF001, PLR2004, ARG002, PT011 """Tests for Docker backend implementation.""" import io import tarfile import tempfile from collections.abc import Generator from unittest.mock import MagicMock, Mock, patch import pytest from pydantic_core import ValidationError from llm_san... | "/container/file.txt") | 482 | 12 |
vndee/llm-sandbox | train | 17 | 5a64c184212e58afed15faba07540e45f0a2bcf6 | train | tests/test_docker.py | val | vndee/llm-sandbox:tests/test_docker.py | 695 | 8 | assert_* | test_ensure_ownership_with_non_root_user | # ruff: noqa: SLF001, PLR2004, ARG002, PT011
"""Tests for Docker backend implementation."""
import io
import tarfile
import tempfile
from collections.abc import Generator
from unittest.mock import MagicMock, Mock, patch
import pytest
from pydantic_core import ValidationError
from llm_sandbox.const import DefaultIma... | "chown -R 1000:1000 /tmp/test /tmp/test2") | modified | ce34e6d9ff31c14ecf3fc765595b7fff07bae0856c526fa2698751d72a83e6f9 | assert_*|test_ensure_ownership_with_non_root_user|# ruff: noqa: SLF001, PLR2004, ARG002, PT011 """Tests for Docker backend implementation.""" import io import tarfile import tempfile from collections.abc import Generator from unittest.mock import MagicMock, Mock, patch import pytest from pydantic_core import Validation... | "chown -R 1000:1000 /tmp/test /tmp/test2") | 695 | 8 |
vndee/llm-sandbox | train | 17 | 5a64c184212e58afed15faba07540e45f0a2bcf6 | train | tests/test_docker.py | val | vndee/llm-sandbox:tests/test_docker.py | 897 | 8 | assert | test_init_with_deprecated_mounts_parameter_single_mount | # ruff: noqa: SLF001, PLR2004, ARG002, PT011
"""Tests for Docker backend implementation."""
import io
import tarfile
import tempfile
from collections.abc import Generator
from unittest.mock import MagicMock, Mock, patch
import pytest
from pydantic_core import ValidationError
from llm_sandbox.const import DefaultIma... | session.config.runtime_configs | modified | 695c7b0d77704396d0e8140ea48f7ee5c3aaa7b9676d533826580f2409a9476b | assert|test_init_with_deprecated_mounts_parameter_single_mount|# ruff: noqa: SLF001, PLR2004, ARG002, PT011 """Tests for Docker backend implementation.""" import io import tarfile import tempfile from collections.abc import Generator from unittest.mock import MagicMock, Mock, patch import pytest from pydantic_core impo... | session.config.runtime_configs | 897 | 8 |
vndee/llm-sandbox | train | 17 | 5a64c184212e58afed15faba07540e45f0a2bcf6 | train | tests/test_podman.py | train | vndee/llm-sandbox:tests/test_podman.py | 252 | 13 | pytest.raises | test_copy_to_runtime_no_container | # ruff: noqa: SLF001, PLR2004, ARG002, PT011
"""Tests for Podman backend implementation."""
from unittest.mock import MagicMock, Mock, patch
import pytest
from pydantic_core import ValidationError
from llm_sandbox.const import SupportedLanguage
from llm_sandbox.data import ConsoleOutput
from llm_sandbox.exceptions ... | NotOpenSessionError) | modified | dd46bac21098220964f61ced361483ca391a970c66872b27a5bcf60fb6918554 | pytest.raises|test_copy_to_runtime_no_container|# ruff: noqa: SLF001, PLR2004, ARG002, PT011 """Tests for Podman backend implementation.""" from unittest.mock import MagicMock, Mock, patch import pytest from pydantic_core import ValidationError from llm_sandbox.const import SupportedLanguage from llm_sandbox.data impor... | NotOpenSessionError) | 252 | 13 |
vndee/llm-sandbox | train | 17 | 5a64c184212e58afed15faba07540e45f0a2bcf6 | train | tests/test_podman.py | train | vndee/llm-sandbox:tests/test_podman.py | 445 | 13 | pytest.raises | test_get_archive_no_container | # ruff: noqa: SLF001, PLR2004, ARG002, PT011
"""Tests for Podman backend implementation."""
from unittest.mock import MagicMock, Mock, patch
import pytest
from pydantic_core import ValidationError
from llm_sandbox.const import SupportedLanguage
from llm_sandbox.data import ConsoleOutput
from llm_sandbox.exceptions ... | NotOpenSessionError) | modified | 32ba2a98c5f8f9c3f8dda905cfbf5293f08d3a01591a92293b4b29974791b2e2 | pytest.raises|test_get_archive_no_container|# ruff: noqa: SLF001, PLR2004, ARG002, PT011 """Tests for Podman backend implementation.""" from unittest.mock import MagicMock, Mock, patch import pytest from pydantic_core import ValidationError from llm_sandbox.const import SupportedLanguage from llm_sandbox.data import Co... | NotOpenSessionError) | 445 | 13 |
vndee/llm-sandbox | train | 17 | 5a64c184212e58afed15faba07540e45f0a2bcf6 | train | tests/test_session_base.py | train | vndee/llm-sandbox:tests/test_session_base.py | 307 | 8 | assert | test_check_security_policy_with_patterns | # ruff: noqa: E501, SLF001, ARG002, PLR2004, FBT003
"""Test cases for the new architecture BaseSession."""
import logging
import threading
import time
from typing import Any
from unittest.mock import MagicMock, Mock, call, patch
import pytest
from llm_sandbox.const import SupportedLanguage
from llm_sandbox.core.conf... | False | modified | 6a5f77b84f2809adeb64e034133a3882f2e1753bb2082e2e80096054ded9cd57 | assert|test_check_security_policy_with_patterns|# ruff: noqa: E501, SLF001, ARG002, PLR2004, FBT003 """Test cases for the new architecture BaseSession.""" import logging import threading import time from typing import Any from unittest.mock import MagicMock, Mock, call, patch import pytest from llm_sandbox.const import... | False | 308 | 8 |
vndee/llm-sandbox | train | 17 | 5a64c184212e58afed15faba07540e45f0a2bcf6 | train | tests/test_session_base.py | train | vndee/llm-sandbox:tests/test_session_base.py | 316 | 8 | assert | test_is_safe_wrapper | # ruff: noqa: E501, SLF001, ARG002, PLR2004, FBT003
"""Test cases for the new architecture BaseSession."""
import logging
import threading
import time
from typing import Any
from unittest.mock import MagicMock, Mock, call, patch
import pytest
from llm_sandbox.const import SupportedLanguage
from llm_sandbox.core.conf... | True | modified | eaee12256ce5df7443b0a6cc61d5d6999504c7782956b80f9989a7e22674523e | assert|test_is_safe_wrapper|# ruff: noqa: E501, SLF001, ARG002, PLR2004, FBT003 """Test cases for the new architecture BaseSession.""" import logging import threading import time from typing import Any from unittest.mock import MagicMock, Mock, call, patch import pytest from llm_sandbox.const import SupportedLanguage f... | True | 317 | 8 |
vndee/llm-sandbox | train | 17 | 5a64c184212e58afed15faba07540e45f0a2bcf6 | train | tests/test_session_base.py | train | vndee/llm-sandbox:tests/test_session_base.py | 583 | 16 | assert | test_context_manager_success | # ruff: noqa: E501, SLF001, ARG002, PLR2004, FBT003
"""Test cases for the new architecture BaseSession."""
import logging
import threading
import time
from typing import Any
from unittest.mock import MagicMock, Mock, call, patch
import pytest
from llm_sandbox.const import SupportedLanguage
from llm_sandbox.core.conf... | self.session | added | 331250a6125938a48123f841482172f08211d8bed41330a78609e704e1a115a2 | assert|test_context_manager_success|# ruff: noqa: E501, SLF001, ARG002, PLR2004, FBT003 """Test cases for the new architecture BaseSession.""" import logging import threading import time from typing import Any from unittest.mock import MagicMock, Mock, call, patch import pytest from llm_sandbox.const import SupportedLa... | null | null | null |
vndee/llm-sandbox | train | 18 | cc45261ea5cbd9b9c331459a1d84ad46107dfddc | train | tests/test_docker.py | val | vndee/llm-sandbox:tests/test_docker.py | 897 | 8 | assert | test_init_with_deprecated_mounts_parameter_single_mount | # ruff: noqa: SLF001, PLR2004, ARG002, PT011
"""Tests for Docker backend implementation."""
import io
import tarfile
import tempfile
from collections.abc import Generator
from unittest.mock import MagicMock, Mock, patch
import pytest
from pydantic_core import ValidationError
from llm_sandbox.const import DefaultIma... | session.config.runtime_configs | modified | 33af18fb58310f39ae13e668074b40a4929d9dbed44a2309f98b8945480c9724 | assert|test_init_with_deprecated_mounts_parameter_single_mount|# ruff: noqa: SLF001, PLR2004, ARG002, PT011 """Tests for Docker backend implementation.""" import io import tarfile import tempfile from collections.abc import Generator from unittest.mock import MagicMock, Mock, patch import pytest from pydantic_core impo... | session.config.runtime_configs | 897 | 8 |
vndee/llm-sandbox | train | 18 | cc45261ea5cbd9b9c331459a1d84ad46107dfddc | train | tests/test_docker.py | val | vndee/llm-sandbox:tests/test_docker.py | 937 | 8 | assert_* | test_ensure_directory_exists_failure | # ruff: noqa: SLF001, PLR2004, ARG002, PT011
"""Tests for Docker backend implementation."""
import io
import tarfile
import tempfile
from collections.abc import Generator
from unittest.mock import MagicMock, Mock, patch
import pytest
from pydantic_core import ValidationError
from llm_sandbox.const import DefaultIma... | "error") | modified | 9cb349b389c9159e6300f2105a64d5274e21ad7358d9009a272dda12c7798903 | assert_*|test_ensure_directory_exists_failure|# ruff: noqa: SLF001, PLR2004, ARG002, PT011 """Tests for Docker backend implementation.""" import io import tarfile import tempfile from collections.abc import Generator from unittest.mock import MagicMock, Mock, patch import pytest from pydantic_core import ValidationErro... | "error") | 937 | 8 |
vndee/llm-sandbox | train | 18 | cc45261ea5cbd9b9c331459a1d84ad46107dfddc | train | tests/test_docker.py | val | vndee/llm-sandbox:tests/test_docker.py | 1,024 | 8 | assert_* | test_handle_timeout | # ruff: noqa: SLF001, PLR2004, ARG002, PT011
"""Tests for Docker backend implementation."""
import io
import tarfile
import tempfile
from collections.abc import Generator
from unittest.mock import MagicMock, Mock, patch
import pytest
from pydantic_core import ValidationError
from llm_sandbox.const import DefaultIma... | "abc123") | modified | 38b53936c32d228bd3d22ee17a348d6b346fa1a9543d36993a986041ba9a1d5f | assert_*|test_handle_timeout|# ruff: noqa: SLF001, PLR2004, ARG002, PT011 """Tests for Docker backend implementation.""" import io import tarfile import tempfile from collections.abc import Generator from unittest.mock import MagicMock, Mock, patch import pytest from pydantic_core import ValidationError from llm_sandbo... | "abc123") | 1,024 | 8 |
vndee/llm-sandbox | train | 18 | cc45261ea5cbd9b9c331459a1d84ad46107dfddc | train | tests/test_docker.py | val | vndee/llm-sandbox:tests/test_docker.py | 1,216 | 8 | assert | test_close_container_cleanup_exception | # ruff: noqa: SLF001, PLR2004, ARG002, PT011
"""Tests for Docker backend implementation."""
import io
import tarfile
import tempfile
from collections.abc import Generator
from unittest.mock import MagicMock, Mock, patch
import pytest
from pydantic_core import ValidationError
from llm_sandbox.const import DefaultIma... | None | modified | 18a8f2aec350465f4d9f537cf8051cee97dd4fa1160d6bc15238c59d0cebd4f8 | assert|test_close_container_cleanup_exception|# ruff: noqa: SLF001, PLR2004, ARG002, PT011 """Tests for Docker backend implementation.""" import io import tarfile import tempfile from collections.abc import Generator from unittest.mock import MagicMock, Mock, patch import pytest from pydantic_core import ValidationErro... | None | 1,216 | 8 |
vndee/llm-sandbox | train | 19 | 90087b10c6b3e81488eee184200d20256b1dbf5b | train | tests/test_docker.py | val | vndee/llm-sandbox:tests/test_docker.py | 739 | 8 | assert | test_init | # ruff: noqa: SLF001, PLR2004, ARG002, PT011
"""Tests for Docker backend implementation."""
import io
import tarfile
import tempfile
from collections.abc import Generator
from unittest.mock import MagicMock, Mock, patch
import pytest
from pydantic_core import ValidationError
from llm_sandbox.const import DefaultIma... | mock_client | modified | adbd3e03c4c82701f68f7892bd7d9d9be1ad66122c10522ee32fc46d35d482a1 | assert|test_init|# ruff: noqa: SLF001, PLR2004, ARG002, PT011 """Tests for Docker backend implementation.""" import io import tarfile import tempfile from collections.abc import Generator from unittest.mock import MagicMock, Mock, patch import pytest from pydantic_core import ValidationError from llm_sandbox.const impo... | mock_client | 742 | 8 |
vndee/llm-sandbox | train | 19 | 90087b10c6b3e81488eee184200d20256b1dbf5b | train | tests/test_docker.py | val | vndee/llm-sandbox:tests/test_docker.py | 761 | 8 | assert | test_create_container | # ruff: noqa: SLF001, PLR2004, ARG002, PT011
"""Tests for Docker backend implementation."""
import io
import tarfile
import tempfile
from collections.abc import Generator
from unittest.mock import MagicMock, Mock, patch
import pytest
from pydantic_core import ValidationError
from llm_sandbox.const import DefaultIma... | mock_container | modified | 3abbf2d51dd23dc8ad17aae36d661c57b4f4c46338cbfdc07ce844688f42a771 | assert|test_create_container|# ruff: noqa: SLF001, PLR2004, ARG002, PT011 """Tests for Docker backend implementation.""" import io import tarfile import tempfile from collections.abc import Generator from unittest.mock import MagicMock, Mock, patch import pytest from pydantic_core import ValidationError from llm_sandbo... | mock_container | 764 | 8 |
vndee/llm-sandbox | train | 19 | 90087b10c6b3e81488eee184200d20256b1dbf5b | train | tests/test_kubernetes.py | train | vndee/llm-sandbox:tests/test_kubernetes.py | 1,669 | 12 | assert_* | test_full_session_lifecycle | # ruff: noqa: SLF001, PLR2004, ARG002, PT011, PT012
"""Tests for Kubernetes backend implementation."""
import io
import tarfile
import tempfile
from unittest.mock import MagicMock, Mock, patch
import pytest
from llm_sandbox.const import DefaultImage, SupportedLanguage
from llm_sandbox.data import ConsoleOutput
from... | ["requests"]) | added | 9bf50bd3897988f6c509b6750fe141b7f51c117f1e9764e500313f306b25b7ab | assert_*|test_full_session_lifecycle|# ruff: noqa: SLF001, PLR2004, ARG002, PT011, PT012 """Tests for Kubernetes backend implementation.""" import io import tarfile import tempfile from unittest.mock import MagicMock, Mock, patch import pytest from llm_sandbox.const import DefaultImage, SupportedLanguage from llm_sandb... | null | null | null |
vndee/llm-sandbox | train | 19 | 90087b10c6b3e81488eee184200d20256b1dbf5b | train | tests/test_micromamba.py | val | vndee/llm-sandbox:tests/test_micromamba.py | 469 | 12 | assert_* | test_very_long_commands | # ruff: noqa: SLF001, PLR2004, ARG002
"""Tests for Micromamba backend implementation."""
from unittest.mock import MagicMock, patch
import pytest
from llm_sandbox.const import SupportedLanguage
from llm_sandbox.micromamba import MicromambaSession
from llm_sandbox.security import SecurityPolicy
class TestMicromamb... | expected_full_command) | added | dc668ee35c2c3a553a75848e75eaf808538aff8a503328cb5132a953973924b3 | assert_*|test_very_long_commands|# ruff: noqa: SLF001, PLR2004, ARG002 """Tests for Micromamba backend implementation.""" from unittest.mock import MagicMock, patch import pytest from llm_sandbox.const import SupportedLanguage from llm_sandbox.micromamba import MicromambaSession from llm_sandbox.security import Securit... | null | null | null |
vndee/llm-sandbox | train | 19 | 90087b10c6b3e81488eee184200d20256b1dbf5b | train | tests/test_micromamba.py | val | vndee/llm-sandbox:tests/test_micromamba.py | 519 | 16 | assert | test_context_manager_functionality | # ruff: noqa: SLF001, PLR2004, ARG002
"""Tests for Micromamba backend implementation."""
from unittest.mock import MagicMock, patch
import pytest
from llm_sandbox.const import SupportedLanguage
from llm_sandbox.micromamba import MicromambaSession
from llm_sandbox.security import SecurityPolicy
class TestMicromamb... | "base" | modified | 619f248eb613f79799b42559205e86dccded4511423fac0228677c02dd53a967 | assert|test_context_manager_functionality|# ruff: noqa: SLF001, PLR2004, ARG002 """Tests for Micromamba backend implementation.""" from unittest.mock import MagicMock, patch import pytest from llm_sandbox.const import SupportedLanguage from llm_sandbox.micromamba import MicromambaSession from llm_sandbox.security impor... | session | 522 | 16 |
vndee/llm-sandbox | train | 19 | 90087b10c6b3e81488eee184200d20256b1dbf5b | train | tests/test_podman.py | train | vndee/llm-sandbox:tests/test_podman.py | 332 | 8 | assert | test_execute_command_success_with_stream | # ruff: noqa: SLF001, PLR2004, ARG002, PT011
"""Tests for Podman backend implementation."""
from unittest.mock import MagicMock, Mock, patch
import pytest
from pydantic_core import ValidationError
from llm_sandbox.const import SupportedLanguage
from llm_sandbox.data import ConsoleOutput
from llm_sandbox.exceptions ... | "stderr chunk 1stderr chunk 2final stderr" | modified | 37b9361a7f2fac80a636b8390f1d874ba24d947cba275929be3d9225e37d780c | assert|test_execute_command_success_with_stream|# ruff: noqa: SLF001, PLR2004, ARG002, PT011 """Tests for Podman backend implementation.""" from unittest.mock import MagicMock, Mock, patch import pytest from pydantic_core import ValidationError from llm_sandbox.const import SupportedLanguage from llm_sandbox.data impor... | "stderr chunk 1stderr chunk 2final stderr" | 335 | 8 |
vndee/llm-sandbox | train | 19 | 90087b10c6b3e81488eee184200d20256b1dbf5b | train | tests/test_podman.py | train | vndee/llm-sandbox:tests/test_podman.py | 385 | 13 | pytest.raises | test_execute_command_no_container | # ruff: noqa: SLF001, PLR2004, ARG002, PT011
"""Tests for Podman backend implementation."""
from unittest.mock import MagicMock, Mock, patch
import pytest
from pydantic_core import ValidationError
from llm_sandbox.const import SupportedLanguage
from llm_sandbox.data import ConsoleOutput
from llm_sandbox.exceptions ... | NotOpenSessionError) | modified | 5b7fba81210fd886e0c8e8a60963cb08bf502bfa501670285ab7eaaa7ad1ea9a | pytest.raises|test_execute_command_no_container|# ruff: noqa: SLF001, PLR2004, ARG002, PT011 """Tests for Podman backend implementation.""" from unittest.mock import MagicMock, Mock, patch import pytest from pydantic_core import ValidationError from llm_sandbox.const import SupportedLanguage from llm_sandbox.data impor... | NotOpenSessionError) | 388 | 13 |
vndee/llm-sandbox | train | 19 | 90087b10c6b3e81488eee184200d20256b1dbf5b | train | tests/test_session_base.py | train | vndee/llm-sandbox:tests/test_session_base.py | 592 | 17 | pytest.raises | test_context_manager_exception | # ruff: noqa: E501, SLF001, ARG002, PLR2004, FBT003
"""Test cases for the new architecture BaseSession."""
import logging
import threading
import time
from typing import Any
from unittest.mock import MagicMock, Mock, call, patch
import pytest
from llm_sandbox.const import SupportedLanguage
from llm_sandbox.core.conf... | ValueError) | modified | 504012ac854a29f75d269d873b546f59ca18c7661025404bf84ada492d899313 | pytest.raises|test_context_manager_exception|# ruff: noqa: E501, SLF001, ARG002, PLR2004, FBT003 """Test cases for the new architecture BaseSession.""" import logging import threading import time from typing import Any from unittest.mock import MagicMock, Mock, call, patch import pytest from llm_sandbox.const import Su... | ValueError) | 594 | 17 |
vndee/llm-sandbox | train | 20 | 58dbece5a6f58c32f27c42692c5d34c8b8a00622 | train | tests/test_mixins.py | train | vndee/llm-sandbox:tests/test_mixins.py | 130 | 13 | pytest.raises | test_execute_with_timeout_no_handler | # ruff: noqa: SLF001, PLR2004, ARG002, PT011, FBT003
"""Test cases for the new architecture mixins."""
import io
import tarfile
import time
from pathlib import Path
from unittest.mock import MagicMock, Mock, patch
import pytest
from llm_sandbox.core.mixins import CommandExecutionMixin, FileOperationsMixin, TimeoutM... | SandboxTimeoutError, match="Operation timed out after 0.1 seconds") | added | f71a7c82bc181c13140770eaf6fe0e82d49c2fc2d64a5341c16a1571cdb5de5a | pytest.raises|test_execute_with_timeout_no_handler|# ruff: noqa: SLF001, PLR2004, ARG002, PT011, FBT003 """Test cases for the new architecture mixins.""" import io import tarfile import time from pathlib import Path from unittest.mock import MagicMock, Mock, patch import pytest from llm_sandbox.core.mixins import Comma... | null | null | null |
vndee/llm-sandbox | train | 20 | 58dbece5a6f58c32f27c42692c5d34c8b8a00622 | train | tests/test_mixins.py | train | vndee/llm-sandbox:tests/test_mixins.py | 184 | 13 | pytest.raises | test_copy_to_runtime_no_container | # ruff: noqa: SLF001, PLR2004, ARG002, PT011, FBT003
"""Test cases for the new architecture mixins."""
import io
import tarfile
import time
from pathlib import Path
from unittest.mock import MagicMock, Mock, patch
import pytest
from llm_sandbox.core.mixins import CommandExecutionMixin, FileOperationsMixin, TimeoutM... | NotOpenSessionError) | added | 8847180f958d4466f203057f0b397580d162d89cd771b68651b26040b6f8ab16 | pytest.raises|test_copy_to_runtime_no_container|# ruff: noqa: SLF001, PLR2004, ARG002, PT011, FBT003 """Test cases for the new architecture mixins.""" import io import tarfile import time from pathlib import Path from unittest.mock import MagicMock, Mock, patch import pytest from llm_sandbox.core.mixins import CommandE... | null | null | null |
vndee/llm-sandbox | train | 20 | 58dbece5a6f58c32f27c42692c5d34c8b8a00622 | train | tests/test_mixins.py | train | vndee/llm-sandbox:tests/test_mixins.py | 196 | 13 | pytest.raises | test_copy_to_runtime_file_not_exists | # ruff: noqa: SLF001, PLR2004, ARG002, PT011, FBT003
"""Test cases for the new architecture mixins."""
import io
import tarfile
import time
from pathlib import Path
from unittest.mock import MagicMock, Mock, patch
import pytest
from llm_sandbox.core.mixins import CommandExecutionMixin, FileOperationsMixin, TimeoutM... | FileNotFoundError) | added | 8aa77717b985316bd598a8aad7cf3c5757fb612641f6c389e0ef89f385b91f17 | pytest.raises|test_copy_to_runtime_file_not_exists|# ruff: noqa: SLF001, PLR2004, ARG002, PT011, FBT003 """Test cases for the new architecture mixins.""" import io import tarfile import time from pathlib import Path from unittest.mock import MagicMock, Mock, patch import pytest from llm_sandbox.core.mixins import Comma... | null | null | null |
vndee/llm-sandbox | train | 20 | 58dbece5a6f58c32f27c42692c5d34c8b8a00622 | train | tests/test_mixins.py | train | vndee/llm-sandbox:tests/test_mixins.py | 233 | 13 | pytest.raises | test_copy_from_runtime_file_not_found | # ruff: noqa: SLF001, PLR2004, ARG002, PT011, FBT003
"""Test cases for the new architecture mixins."""
import io
import tarfile
import time
from pathlib import Path
from unittest.mock import MagicMock, Mock, patch
import pytest
from llm_sandbox.core.mixins import CommandExecutionMixin, FileOperationsMixin, TimeoutM... | FileNotFoundError) | added | 1902866add06ab28137a7f1eba7a5be3f9d745d86d719cbf5f41033224bbdfee | pytest.raises|test_copy_from_runtime_file_not_found|# ruff: noqa: SLF001, PLR2004, ARG002, PT011, FBT003 """Test cases for the new architecture mixins.""" import io import tarfile import time from pathlib import Path from unittest.mock import MagicMock, Mock, patch import pytest from llm_sandbox.core.mixins import Comm... | null | null | null |
vndee/llm-sandbox | train | 20 | 58dbece5a6f58c32f27c42692c5d34c8b8a00622 | train | tests/test_session_base.py | train | vndee/llm-sandbox:tests/test_session_base.py | 557 | 17 | pytest.raises | test_run_timeout_exception | # ruff: noqa: E501, SLF001, ARG002, PLR2004, FBT003
"""Test cases for the new architecture BaseSession."""
import logging
import threading
import time
from typing import Any
from unittest.mock import MagicMock, Mock, call, patch
import pytest
from llm_sandbox.const import SupportedLanguage
from llm_sandbox.core.conf... | SandboxTimeoutError) | modified | c810dc4681bf94d6a05e6af7bec77e3202da71816b8464878ff3b56b8bfbf551 | pytest.raises|test_run_timeout_exception|# ruff: noqa: E501, SLF001, ARG002, PLR2004, FBT003 """Test cases for the new architecture BaseSession.""" import logging import threading import time from typing import Any from unittest.mock import MagicMock, Mock, call, patch import pytest from llm_sandbox.const import Suppor... | SandboxTimeoutError) | 556 | 17 |
vndee/llm-sandbox | train | 20 | 58dbece5a6f58c32f27c42692c5d34c8b8a00622 | train | tests/test_session_base.py | train | vndee/llm-sandbox:tests/test_session_base.py | 582 | 16 | assert | test_context_manager_success | # ruff: noqa: E501, SLF001, ARG002, PLR2004, FBT003
"""Test cases for the new architecture BaseSession."""
import logging
import threading
import time
from typing import Any
from unittest.mock import MagicMock, Mock, call, patch
import pytest
from llm_sandbox.const import SupportedLanguage
from llm_sandbox.core.conf... | self.session | modified | a03a95b0e39a851d433ee1067f3a471665fc375acecb4b2cf424fb09aed9d537 | assert|test_context_manager_success|# ruff: noqa: E501, SLF001, ARG002, PLR2004, FBT003 """Test cases for the new architecture BaseSession.""" import logging import threading import time from typing import Any from unittest.mock import MagicMock, Mock, call, patch import pytest from llm_sandbox.const import SupportedLa... | self.session | 581 | 16 |
vndee/llm-sandbox | train | 20 | 58dbece5a6f58c32f27c42692c5d34c8b8a00622 | train | tests/test_session_base.py | train | vndee/llm-sandbox:tests/test_session_base.py | 593 | 17 | pytest.raises | test_context_manager_exception | # ruff: noqa: E501, SLF001, ARG002, PLR2004, FBT003
"""Test cases for the new architecture BaseSession."""
import logging
import threading
import time
from typing import Any
from unittest.mock import MagicMock, Mock, call, patch
import pytest
from llm_sandbox.const import SupportedLanguage
from llm_sandbox.core.conf... | ValueError) | modified | e01e521647af6b5550347dc9ee8e7d003e029434c18da67f41901bda6dab5dfd | pytest.raises|test_context_manager_exception|# ruff: noqa: E501, SLF001, ARG002, PLR2004, FBT003 """Test cases for the new architecture BaseSession.""" import logging import threading import time from typing import Any from unittest.mock import MagicMock, Mock, call, patch import pytest from llm_sandbox.const import Su... | ValueError) | 592 | 17 |
vndee/llm-sandbox | train | 20 | 58dbece5a6f58c32f27c42692c5d34c8b8a00622 | train | tests/test_session_base.py | train | vndee/llm-sandbox:tests/test_session_base.py | 618 | 12 | assert | test_open_sets_state | # ruff: noqa: E501, SLF001, ARG002, PLR2004, FBT003
"""Test cases for the new architecture BaseSession."""
import logging
import threading
import time
from typing import Any
from unittest.mock import MagicMock, Mock, call, patch
import pytest
from llm_sandbox.const import SupportedLanguage
from llm_sandbox.core.conf... | True | modified | 53d5137004c075797540eacc12c9c6b1e4b2c310e7ee5416fc5597209aed4eff | assert|test_open_sets_state|# ruff: noqa: E501, SLF001, ARG002, PLR2004, FBT003 """Test cases for the new architecture BaseSession.""" import logging import threading import time from typing import Any from unittest.mock import MagicMock, Mock, call, patch import pytest from llm_sandbox.const import SupportedLanguage f... | True | 617 | 12 |
vndee/llm-sandbox | train | 21 | 11428bad5fbfc6d8df6d8f1a2c67ce32c72549e2 | train | tests/test_docker.py | val | vndee/llm-sandbox:tests/test_docker.py | 689 | 8 | assert_* | test_ensure_ownership_with_non_root_user | # ruff: noqa: SLF001, PLR2004, ARG002, PT011
"""Tests for Docker backend implementation."""
import io
import tarfile
import tempfile
from collections.abc import Generator
from unittest.mock import MagicMock, Mock, patch
import pytest
from docker.errors import ImageNotFound, NotFound
from pydantic_core import Validat... | "chown -R 1000:1000 /tmp/test /tmp/test2") | modified | 26fa1d64ec79a322be7a83707eafeecdd79b5a7d0407e7bdafcb2e62127ccd31 | assert_*|test_ensure_ownership_with_non_root_user|# ruff: noqa: SLF001, PLR2004, ARG002, PT011 """Tests for Docker backend implementation.""" import io import tarfile import tempfile from collections.abc import Generator from unittest.mock import MagicMock, Mock, patch import pytest from docker.errors import ImageNotFo... | "chown -R 1000:1000 /tmp/test /tmp/test2") | 692 | 8 |
vndee/llm-sandbox | train | 21 | 11428bad5fbfc6d8df6d8f1a2c67ce32c72549e2 | train | tests/test_docker.py | val | vndee/llm-sandbox:tests/test_docker.py | 931 | 8 | assert_* | test_ensure_directory_exists_failure | # ruff: noqa: SLF001, PLR2004, ARG002, PT011
"""Tests for Docker backend implementation."""
import io
import tarfile
import tempfile
from collections.abc import Generator
from unittest.mock import MagicMock, Mock, patch
import pytest
from docker.errors import ImageNotFound, NotFound
from pydantic_core import Validat... | "error") | modified | 251a3150807b1c296a3799a5c52abb018ae80f22871c779d06086a5a976a0a38 | assert_*|test_ensure_directory_exists_failure|# ruff: noqa: SLF001, PLR2004, ARG002, PT011 """Tests for Docker backend implementation.""" import io import tarfile import tempfile from collections.abc import Generator from unittest.mock import MagicMock, Mock, patch import pytest from docker.errors import ImageNotFound,... | "error") | 934 | 8 |
vndee/llm-sandbox | train | 21 | 11428bad5fbfc6d8df6d8f1a2c67ce32c72549e2 | train | tests/test_kubernetes.py | train | vndee/llm-sandbox:tests/test_kubernetes.py | 596 | 12 | assert | test_get_archive_file_not_found | # ruff: noqa: SLF001, PLR2004, ARG002, PT011, PT012
"""Tests for Kubernetes backend implementation."""
import io
import tarfile
import tempfile
from unittest.mock import MagicMock, Mock, patch
import pytest
from kubernetes.client.exceptions import ApiException
from llm_sandbox.const import DefaultImage, SupportedLa... | {"size": 0} | modified | 2b3ddc856256f68cde0e4dcab6f6ab47749a5df293fbddc8e042a1063d1da687 | assert|test_get_archive_file_not_found|# ruff: noqa: SLF001, PLR2004, ARG002, PT011, PT012 """Tests for Kubernetes backend implementation.""" import io import tarfile import tempfile from unittest.mock import MagicMock, Mock, patch import pytest from kubernetes.client.exceptions import ApiException from llm_sandbox.con... | {"size": 0} | 595 | 12 |
vndee/llm-sandbox | train | 21 | 11428bad5fbfc6d8df6d8f1a2c67ce32c72549e2 | train | tests/test_kubernetes.py | train | vndee/llm-sandbox:tests/test_kubernetes.py | 1,746 | 8 | assert | test_namespace_awareness | # ruff: noqa: SLF001, PLR2004, ARG002, PT011, PT012
"""Tests for Kubernetes backend implementation."""
import io
import tarfile
import tempfile
from unittest.mock import MagicMock, Mock, patch
import pytest
from kubernetes.client.exceptions import ApiException
from llm_sandbox.const import DefaultImage, SupportedLa... | "test-namespace" | added | 3972cc0543e260bfd1d35969289d4f9f118e17b32cd24f32020204141ce43111 | assert|test_namespace_awareness|# ruff: noqa: SLF001, PLR2004, ARG002, PT011, PT012 """Tests for Kubernetes backend implementation.""" import io import tarfile import tempfile from unittest.mock import MagicMock, Mock, patch import pytest from kubernetes.client.exceptions import ApiException from llm_sandbox.const impo... | null | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.