repo_id
stringclasses
400 values
commit_sha
stringclasses
400 values
commit_index
int32
0
951
in_repo_split
stringclasses
1 value
cross_repo_split
stringclasses
1 value
test_file
stringlengths
7
121
test_function
stringlengths
1
108
assertion_type
stringclasses
32 values
difficulty
stringclasses
8 values
context_lines
int32
3
600
prefix
large_stringlengths
44
113k
target
large_stringlengths
1
498
anchor_sha
stringclasses
400 values
anchor_index
int32
0
951
qna_source
stringclasses
1 value
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_const.py
test_str_enum_creation
assert
string_literal
13
import pytest from llm_sandbox.const import DefaultImage, SandboxBackend, StrEnum, SupportedLanguage class TestStrEnum: def test_str_enum_creation(self) -> None: """Test basic StrEnum creation.""" # Test normal string values assert SandboxBackend.DOCKER == "docker" assert SandboxB...
"podman"
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_go_handler.py
test_init
assert
string_literal
18
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: def test_init(self) -> None: """Test GoHandler initialization.""" handler = GoHandler() assert ...
"go get"
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_interactive_session.py
test_create_backend_session_filters_runtime_configs_for_kubernetes
assert
string_literal
80
import json import signal import subprocess import sys import time import uuid from pathlib import Path from typing import Any, cast from unittest.mock import MagicMock, patch import pytest from llm_sandbox.const import SandboxBackend from llm_sandbox.core.config import SessionConfig from llm_sandbox.data import Cons...
"python"
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_language_handler_factory.py
test_register_custom_handler
assert
string_literal
58
import logging from typing import TYPE_CHECKING import pytest from llm_sandbox.const import SupportedLanguage from llm_sandbox.exceptions import LanguageNotSupportedError from llm_sandbox.language_handlers.base import AbstractLanguageHandler, PlotOutput from llm_sandbox.language_handlers.cpp_handler import CppHandler...
"custom"
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_micromamba.py
test_execute_command_wraps_with_micromamba_run
assert
string_literal
36
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 TestMicromambaSessionExecuteCommand: @patch("llm_sandbox.micromamba.docker.from_env") @patch("ll...
"output"
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_cpp_handler.py
test_inject_plot_detection_code
assert
variable
18
import logging import re from unittest.mock import MagicMock from llm_sandbox.const import SupportedLanguage from llm_sandbox.language_handlers.cpp_handler import CppHandler class TestCppHandler: def test_inject_plot_detection_code(self) -> None: """Test plot detection code injection (should return uncha...
code
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_go_handler.py
test_inject_plot_detection_code
assert
variable
18
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: def test_inject_plot_detection_code(self) -> None: """Test plot detection code injection (should return unchange...
code
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_java_handler.py
test_inject_plot_detection_code
assert
variable
18
import logging import re from unittest.mock import MagicMock from llm_sandbox.const import SupportedLanguage from llm_sandbox.language_handlers.java_handler import JavaHandler class TestJavaHandler: def test_inject_plot_detection_code(self) -> None: """Test plot detection code injection (should return un...
code
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_javascript_handler.py
test_inject_plot_detection_code
assert
variable
18
import logging import re from unittest.mock import MagicMock from llm_sandbox.const import SupportedLanguage from llm_sandbox.language_handlers.javascript_handler import JavaScriptHandler class TestJavaScriptHandler: def test_inject_plot_detection_code(self) -> None: """Test plot detection code injection...
code
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_ruby_handler.py
test_inject_plot_detection_code
assert
variable
18
import logging import re from unittest.mock import MagicMock from llm_sandbox.const import SupportedLanguage from llm_sandbox.language_handlers.ruby_handler import RubyHandler class TestRubyHandler: def test_inject_plot_detection_code(self) -> None: """Test plot detection code injection (should return un...
code
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_data.py
test_plot_output_equality
assert
variable
30
from dataclasses import FrozenInstanceError import pytest from llm_sandbox.data import ConsoleOutput, ExecutionResult, FileType, PlotOutput from llm_sandbox.exceptions import ( CommandEmptyError, CommandFailedError, ExtraArgumentsError, ImageNotFoundError, ImagePullError, LanguageHandlerNotIni...
plot2
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_data.py
test_plot_output_equality
assert
variable
31
from dataclasses import FrozenInstanceError import pytest from llm_sandbox.data import ConsoleOutput, ExecutionResult, FileType, PlotOutput from llm_sandbox.exceptions import ( CommandEmptyError, CommandFailedError, ExtraArgumentsError, ImageNotFoundError, ImagePullError, LanguageHandlerNotIni...
plot3
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_data.py
test_execution_result_with_plots
assert
variable
35
from dataclasses import FrozenInstanceError import pytest from llm_sandbox.data import ConsoleOutput, ExecutionResult, FileType, PlotOutput from llm_sandbox.exceptions import ( CommandEmptyError, CommandFailedError, ExtraArgumentsError, ImageNotFoundError, ImagePullError, LanguageHandlerNotIni...
plot1
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_k8s_utils.py
test_no_retry_on_generic_exception
assert
variable
19
from unittest.mock import MagicMock, patch import pytest from kubernetes.client.exceptions import ApiException from llm_sandbox.k8s_utils import retry_k8s_api_call class TestRetryK8sApiCall: def test_no_retry_on_generic_exception(self): """Test no retry on generic Exception.""" error = ValueErro...
error
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_podman.py
test_get_or_pull_image_uses_local_image
assert
variable
42
from collections.abc import Callable from typing import TYPE_CHECKING, Any, cast 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 import Comman...
image
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_libraries_param.py
test_pool_manager_passes_libraries_to_session
assert
variable
35
from unittest.mock import MagicMock, patch from llm_sandbox.const import SandboxBackend, SupportedLanguage from llm_sandbox.core.session_base import BaseSession from llm_sandbox.pool import PoolConfig, create_pool_manager class TestPoolManagerLibrariesParameter: @patch("llm_sandbox.pool.docker_pool.docker.from_e...
kwargs
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_pool_docker.py
test_init_with_default_client
assert
variable
22
from unittest.mock import MagicMock, patch from docker.errors import NotFound from llm_sandbox.const import SupportedLanguage from llm_sandbox.pool.config import PoolConfig from llm_sandbox.pool.docker_pool import DockerPoolManager class TestDockerPoolManagerInitialization: @patch("llm_sandbox.pool.docker_pool....
config
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_pool_session.py
test_run_delegates
assert
variable
38
from unittest.mock import MagicMock, patch import pytest from llm_sandbox.const import SandboxBackend, SupportedLanguage from llm_sandbox.data import ConsoleOutput from llm_sandbox.pool.config import PoolConfig from llm_sandbox.pool.exceptions import SessionNotOpenError from llm_sandbox.pool.session import ArtifactPo...
output
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_exceptions.py
test_command_failed_error_formatting
assert
variable
33
from llm_sandbox.exceptions import ( CommandEmptyError, CommandFailedError, ContainerError, ExtraArgumentsError, ImageNotFoundError, ImagePullError, InvalidRegexPatternError, LanguageHandlerNotInitializedError, LanguageNotSupportedError, LanguageNotSupportPlotError, LibraryIn...
message
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_micromamba.py
test_context_manager_functionality
assert
variable
29
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 TestMicromambaSessionIntegration: @patch("llm_sandbox.micromamba.docker.from_env") @patch("llm_s...
session
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_session.py
test_context_manager_exit
assert_*
variable
28
from unittest.mock import MagicMock, patch import pytest from llm_sandbox.const import SandboxBackend, SupportedLanguage from llm_sandbox.core.config import SessionConfig from llm_sandbox.data import ExecutionResult, FileType, PlotOutput from llm_sandbox.exceptions import LanguageNotSupportPlotError, MissingDependenc...
exc_tb)
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_const.py
test_str_enum_string_methods
assert
variable
17
import pytest from llm_sandbox.const import DefaultImage, SandboxBackend, StrEnum, SupportedLanguage class TestStrEnum: def test_str_enum_string_methods(self) -> None: """Test StrEnum string methods.""" backend = SandboxBackend.DOCKER # Test __str__ method (line 39) assert str(ba...
repr_str
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_const.py
test_str_enum_in_collections
assert
variable
11
import pytest from llm_sandbox.const import DefaultImage, SandboxBackend, StrEnum, SupportedLanguage class TestStrEnum: def test_str_enum_in_collections(self) -> None: """Test StrEnum usage in collections.""" backends = [SandboxBackend.DOCKER, SandboxBackend.KUBERNETES] assert "docker" i...
backends
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_interactive_session.py
test_open_sets_container_references
assert
variable
140
import json import signal import subprocess import sys import time import uuid from pathlib import Path from typing import Any, cast from unittest.mock import MagicMock, patch import pytest from llm_sandbox.const import SandboxBackend from llm_sandbox.core.config import SessionConfig from llm_sandbox.data import Cons...
mock_api
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_k8s_utils.py
test_fail_after_max_retries
assert
variable
19
from unittest.mock import MagicMock, patch import pytest from kubernetes.client.exceptions import ApiException from llm_sandbox.k8s_utils import retry_k8s_api_call class TestRetryK8sApiCall: def test_fail_after_max_retries(self): """Test failure after exhausting retries.""" ws_error = ApiExcepti...
ws_error
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_language_handler_factory.py
test_handler_consistency_across_creation
assert
variable
26
import logging from typing import TYPE_CHECKING import pytest from llm_sandbox.const import SupportedLanguage from llm_sandbox.exceptions import LanguageNotSupportedError from llm_sandbox.language_handlers.base import AbstractLanguageHandler, PlotOutput from llm_sandbox.language_handlers.cpp_handler import CppHandler...
handler2
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_language_handlers.py
test_filter_comments_removes_multiline
assert
variable
19
import logging import pytest from llm_sandbox.exceptions import LanguageNotSupportedError from llm_sandbox.language_handlers.factory import LanguageHandlerFactory from llm_sandbox.language_handlers.python_handler import PythonHandler class TestAbstractLanguageHandler: def test_filter_comments_removes_multiline(...
filtered
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_micromamba.py
test_environment_parameter_is_respected
assert
variable
25
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 TestMicromambaSessionDocumentation: @patch("llm_sandbox.micromamba.docker.from_env") @patch("llm...
env_name
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_pool_kubernetes.py
test_init_with_pod_manifest
assert
variable
26
from unittest.mock import MagicMock, patch from kubernetes.client.exceptions import ApiException from llm_sandbox.const import SupportedLanguage from llm_sandbox.pool.config import PoolConfig from llm_sandbox.pool.kubernetes_pool import KubernetesPoolManager class TestKubernetesPoolManagerInitialization: @patch...
manifest
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_interactive_session.py
test_execute_commands_delegation
assert_*
variable
122
import json import signal import subprocess import sys import time import uuid from pathlib import Path from typing import Any, cast from unittest.mock import MagicMock, patch import pytest from llm_sandbox.const import SandboxBackend from llm_sandbox.core.config import SessionConfig from llm_sandbox.data import Cons...
commands)
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_k8s_utils.py
test_no_retry_on_other_api_exception
assert
variable
20
from unittest.mock import MagicMock, patch import pytest from kubernetes.client.exceptions import ApiException from llm_sandbox.k8s_utils import retry_k8s_api_call class TestRetryK8sApiCall: def test_no_retry_on_other_api_exception(self): """Test no retry on non-WebSocket ApiException.""" # 404 ...
api_error
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_language_handler_factory.py
test_get_supported_languages
assert
variable
25
import logging from typing import TYPE_CHECKING import pytest from llm_sandbox.const import SupportedLanguage from llm_sandbox.exceptions import LanguageNotSupportedError from llm_sandbox.language_handlers.base import AbstractLanguageHandler, PlotOutput from llm_sandbox.language_handlers.cpp_handler import CppHandler...
supported
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_plot_clearing.py
test_shell_command_compatibility
assert
variable
72
import base64 from typing import Any from unittest.mock import MagicMock, patch import pytest from llm_sandbox import ArtifactSandboxSession, SandboxBackend from llm_sandbox.data import ConsoleOutput, FileType, PlotOutput def create_mock_plot_data(count: int = 1) -> bytes | list[PlotOutput]: """Create mock plot ...
clear_cmd
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_pool_session.py
test_clear_plots
assert
variable
36
from unittest.mock import MagicMock, patch import pytest from llm_sandbox.const import SandboxBackend, SupportedLanguage from llm_sandbox.data import ConsoleOutput from llm_sandbox.pool.config import PoolConfig from llm_sandbox.pool.exceptions import SessionNotOpenError from llm_sandbox.pool.session import ArtifactPo...
call_args
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_session.py
test_run_with_plotting_enabled_supported_language
assert
variable
40
from unittest.mock import MagicMock, patch import pytest from llm_sandbox.const import SandboxBackend, SupportedLanguage from llm_sandbox.core.config import SessionConfig from llm_sandbox.data import ExecutionResult, FileType, PlotOutput from llm_sandbox.exceptions import LanguageNotSupportPlotError, MissingDependenc...
mock_plot
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_python_handler.py
test_extract_plots_success
assert
variable
36
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 llm_sandbox.language_handlers.b...
mock_plot1
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_python_handler.py
test_extract_plots_success
assert
variable
37
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 llm_sandbox.language_handlers.b...
mock_plot2
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_r_handler.py
test_plot_detection_setup_content
assert
variable
24
import logging import re from unittest.mock import MagicMock, patch import pytest from llm_sandbox.const import SupportedLanguage from llm_sandbox.exceptions import LanguageNotSupportPlotError, PackageManagerError from llm_sandbox.language_handlers.base import PlotLibrary from llm_sandbox.language_handlers.r_handler ...
setup_code
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_backend.py
test_docker_specific_features
assert
variable
37
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.security import SecurityPolicy from llm_sandbox.session import create_session class TestBackendS...
test_mounts
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_cpp_handler.py
test_run_with_artifacts_no_plotting_support
assert
variable
27
import logging import re from unittest.mock import MagicMock from llm_sandbox.const import SupportedLanguage from llm_sandbox.language_handlers.cpp_handler import CppHandler class TestCppHandler: def test_run_with_artifacts_no_plotting_support(self) -> None: """Test run_with_artifacts returns empty plots...
mock_result
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_dynamic_paths.py
test_python_handler_none_context
assert
variable
16
from llm_sandbox.language_handlers.cpp_handler import CppHandler from llm_sandbox.language_handlers.python_handler import PythonHandler from llm_sandbox.language_handlers.runtime_context import RuntimeContext class TestBackwardsCompatibility: def test_python_handler_none_context(self) -> None: """Test Pyt...
install_cmd
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_go_handler.py
test_run_with_artifacts_no_plotting_support
assert
variable
27
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: def test_run_with_artifacts_no_plotting_support(self) -> None: """Test run_with_artifacts returns empty plots li...
mock_result
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_interactive_session.py
test_execute_command_delegation
assert
variable
120
import json import signal import subprocess import sys import time import uuid from pathlib import Path from typing import Any, cast from unittest.mock import MagicMock, patch import pytest from llm_sandbox.const import SandboxBackend from llm_sandbox.core.config import SessionConfig from llm_sandbox.data import Cons...
mock_output
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_interactive_session.py
test_create_backend_session_filters_runtime_configs_for_kubernetes
assert
variable
77
import json import signal import subprocess import sys import time import uuid from pathlib import Path from typing import Any, cast from unittest.mock import MagicMock, patch import pytest from llm_sandbox.const import SandboxBackend from llm_sandbox.core.config import SessionConfig from llm_sandbox.data import Cons...
call_kwargs
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_java_handler.py
test_run_with_artifacts_no_plotting_support
assert
variable
27
import logging import re from unittest.mock import MagicMock from llm_sandbox.const import SupportedLanguage from llm_sandbox.language_handlers.java_handler import JavaHandler class TestJavaHandler: def test_run_with_artifacts_no_plotting_support(self) -> None: """Test run_with_artifacts returns empty pl...
mock_result
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_javascript_handler.py
test_run_with_artifacts_no_plotting_support
assert
variable
27
import logging import re from unittest.mock import MagicMock from llm_sandbox.const import SupportedLanguage from llm_sandbox.language_handlers.javascript_handler import JavaScriptHandler class TestJavaScriptHandler: def test_run_with_artifacts_no_plotting_support(self) -> None: """Test run_with_artifact...
mock_result
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_libraries_param.py
test_libraries_installed_during_environment_setup
assert
variable
31
from unittest.mock import MagicMock, patch from llm_sandbox.const import SandboxBackend, SupportedLanguage from llm_sandbox.core.session_base import BaseSession from llm_sandbox.pool import PoolConfig, create_pool_manager class TestPoolManagerLibrariesParameter: @patch("llm_sandbox.pool.docker_pool.docker.from_e...
call_kwargs
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_base_handler.py
test_no_plot_detection_line_212
assert
collection
27
import base64 import io import logging import tarfile from unittest.mock import Mock, patch import pytest from llm_sandbox.data import FileType from llm_sandbox.exceptions import CommandFailedError, PackageManagerError from llm_sandbox.language_handlers.base import AbstractLanguageHandler, LanguageConfig, PlotDetecti...
[]
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_cpp_handler.py
test_run_with_artifacts_no_plotting_support
assert
collection
28
import logging import re from unittest.mock import MagicMock from llm_sandbox.const import SupportedLanguage from llm_sandbox.language_handlers.cpp_handler import CppHandler class TestCppHandler: def test_run_with_artifacts_no_plotting_support(self) -> None: """Test run_with_artifacts returns empty plots...
[]
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_data.py
test_execution_result_creation_minimal
assert
collection
31
from dataclasses import FrozenInstanceError import pytest from llm_sandbox.data import ConsoleOutput, ExecutionResult, FileType, PlotOutput from llm_sandbox.exceptions import ( CommandEmptyError, CommandFailedError, ExtraArgumentsError, ImageNotFoundError, ImagePullError, LanguageHandlerNotIni...
[]
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_data_missing.py
test_execution_result_defaults
assert
collection
15
import warnings from llm_sandbox.data import ConsoleOutput, ExecutionResult, FileType, PlotOutput class TestDataClassDefaults: def test_execution_result_defaults(self) -> None: """Test ExecutionResult with default values.""" # Test with minimal parameters result = ExecutionResult() ...
[]
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_go_handler.py
test_run_with_artifacts_no_plotting_support
assert
collection
28
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: def test_run_with_artifacts_no_plotting_support(self) -> None: """Test run_with_artifacts returns empty plots li...
[]
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_java_handler.py
test_run_with_artifacts_no_plotting_support
assert
collection
28
import logging import re from unittest.mock import MagicMock from llm_sandbox.const import SupportedLanguage from llm_sandbox.language_handlers.java_handler import JavaHandler class TestJavaHandler: def test_run_with_artifacts_no_plotting_support(self) -> None: """Test run_with_artifacts returns empty pl...
[]
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_javascript_handler.py
test_run_with_artifacts_no_plotting_support
assert
collection
28
import logging import re from unittest.mock import MagicMock from llm_sandbox.const import SupportedLanguage from llm_sandbox.language_handlers.javascript_handler import JavaScriptHandler class TestJavaScriptHandler: def test_run_with_artifacts_no_plotting_support(self) -> None: """Test run_with_artifact...
[]
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_python_handler.py
test_run_with_artifacts_plotting_disabled
assert
collection
36
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 llm_sandbox.language_handlers.b...
[]
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_r_handler.py
test_run_with_artifacts_without_plotting
assert
collection
32
import logging import re from unittest.mock import MagicMock, patch import pytest from llm_sandbox.const import SupportedLanguage from llm_sandbox.exceptions import LanguageNotSupportPlotError, PackageManagerError from llm_sandbox.language_handlers.base import PlotLibrary from llm_sandbox.language_handlers.r_handler ...
[]
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_ruby_handler.py
test_run_with_artifacts_no_plotting_support
assert
collection
28
import logging import re from unittest.mock import MagicMock from llm_sandbox.const import SupportedLanguage from llm_sandbox.language_handlers.ruby_handler import RubyHandler class TestRubyHandler: def test_run_with_artifacts_no_plotting_support(self) -> None: """Test run_with_artifacts returns empty pl...
[]
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_session.py
test_run_with_plotting_disabled
assert
collection
34
from unittest.mock import MagicMock, patch import pytest from llm_sandbox.const import SandboxBackend, SupportedLanguage from llm_sandbox.core.config import SessionConfig from llm_sandbox.data import ExecutionResult, FileType, PlotOutput from llm_sandbox.exceptions import LanguageNotSupportPlotError, MissingDependenc...
[]
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_session_base.py
test_check_security_policy_no_policy
assert
collection
42
import logging from typing import Any from unittest.mock import MagicMock, Mock, call, patch import pytest from llm_sandbox.const import SupportedLanguage from llm_sandbox.core.config import SessionConfig from llm_sandbox.core.mixins import ContainerAPI from llm_sandbox.core.session_base import BaseSession from llm_s...
[]
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_interactive_session.py
test_process_output_without_backend
assert
collection
121
import json import signal import subprocess import sys import time import uuid from pathlib import Path from typing import Any, cast from unittest.mock import MagicMock, patch import pytest from llm_sandbox.const import SandboxBackend from llm_sandbox.core.config import SessionConfig from llm_sandbox.data import Cons...
("", "")
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_libraries_param.py
test_libraries_with_skip_environment_setup
assert
collection
33
from unittest.mock import MagicMock, patch from llm_sandbox.const import SandboxBackend, SupportedLanguage from llm_sandbox.core.session_base import BaseSession from llm_sandbox.pool import PoolConfig, create_pool_manager class TestPoolManagerLibrariesParameter: @patch("llm_sandbox.pool.docker_pool.docker.from_e...
["numpy"]
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_base_handler.py
test_extract_single_plot_exception_handling
assert
none_literal
37
import base64 import io import logging import tarfile from unittest.mock import Mock, patch import pytest from llm_sandbox.data import FileType from llm_sandbox.exceptions import CommandFailedError, PackageManagerError from llm_sandbox.language_handlers.base import AbstractLanguageHandler, LanguageConfig, PlotDetecti...
None
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_cpp_handler.py
test_init
assert
none_literal
19
import logging import re from unittest.mock import MagicMock from llm_sandbox.const import SupportedLanguage from llm_sandbox.language_handlers.cpp_handler import CppHandler class TestCppHandler: def test_init(self) -> None: """Test CppHandler initialization.""" handler = CppHandler() as...
None
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_docker.py
test_init_with_defaults
assert
none_literal
33
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 ValidationError from llm_sandbox.const import DefaultImage, SupportedLanguage from llm_sandbox.data ...
None
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_exceptions.py
test_sandbox_timeout_error_basic
assert
none_literal
33
from llm_sandbox.exceptions import ( CommandEmptyError, CommandFailedError, ContainerError, ExtraArgumentsError, ImageNotFoundError, ImagePullError, InvalidRegexPatternError, LanguageHandlerNotInitializedError, LanguageNotSupportedError, LanguageNotSupportPlotError, LibraryIn...
None
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_go_handler.py
test_init
assert
none_literal
19
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: def test_init(self) -> None: """Test GoHandler initialization.""" handler = GoHandler() assert ...
None
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_interactive_session.py
test_interactive_session_kubernetes_with_runtime_configs
assert
none_literal
58
import json import signal import subprocess import sys import time import uuid from pathlib import Path from typing import Any, cast from unittest.mock import MagicMock, patch import pytest from llm_sandbox.const import SandboxBackend from llm_sandbox.core.config import SessionConfig from llm_sandbox.data import Cons...
None
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_java_handler.py
test_init
assert
none_literal
19
import logging import re from unittest.mock import MagicMock from llm_sandbox.const import SupportedLanguage from llm_sandbox.language_handlers.java_handler import JavaHandler class TestJavaHandler: def test_init(self) -> None: """Test JavaHandler initialization.""" handler = JavaHandler() ...
None
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_javascript_handler.py
test_init
assert
none_literal
19
import logging import re from unittest.mock import MagicMock from llm_sandbox.const import SupportedLanguage from llm_sandbox.language_handlers.javascript_handler import JavaScriptHandler class TestJavaScriptHandler: def test_init(self) -> None: """Test JavaScriptHandler initialization.""" handle...
None
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_language_handler_factory.py
test_create_handler_with_none_logger
assert
none_literal
25
import logging from typing import TYPE_CHECKING import pytest from llm_sandbox.const import SupportedLanguage from llm_sandbox.exceptions import LanguageNotSupportedError from llm_sandbox.language_handlers.base import AbstractLanguageHandler, PlotOutput from llm_sandbox.language_handlers.cpp_handler import CppHandler...
None
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_libraries_param.py
test_pool_manager_passes_libraries_to_session
assert
none_literal
33
from unittest.mock import MagicMock, patch from llm_sandbox.const import SandboxBackend, SupportedLanguage from llm_sandbox.core.session_base import BaseSession from llm_sandbox.pool import PoolConfig, create_pool_manager class TestPoolManagerLibrariesParameter: @patch("llm_sandbox.pool.docker_pool.docker.from_e...
None
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_podman.py
test_init_with_defaults
assert
none_literal
41
from collections.abc import Callable from typing import TYPE_CHECKING, Any, cast 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 import Comman...
None
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_pool_base.py
test_initialization
assert
none_literal
22
import time from typing import Any from unittest.mock import MagicMock import pytest from llm_sandbox.const import SupportedLanguage from llm_sandbox.pool.base import ContainerPoolManager, ContainerState, PooledContainer from llm_sandbox.pool.config import ExhaustionStrategy, PoolConfig from llm_sandbox.pool.exceptio...
None
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_pool_base.py
test_acquire_release
assert
complex_expr
23
import time from typing import Any from unittest.mock import MagicMock import pytest from llm_sandbox.const import SupportedLanguage from llm_sandbox.pool.base import ContainerPoolManager, ContainerState, PooledContainer from llm_sandbox.pool.config import ExhaustionStrategy, PoolConfig from llm_sandbox.pool.exceptio...
pool._pool
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_dynamic_paths.py
test_python_writable_workspace
assert
complex_expr
23
from llm_sandbox.language_handlers.cpp_handler import CppHandler from llm_sandbox.language_handlers.python_handler import PythonHandler from llm_sandbox.language_handlers.runtime_context import RuntimeContext class TestReadOnlyFilesystemSupport: def test_python_writable_workspace(self) -> None: """Test Py...
commands[0]
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_python_handler.py
test_extract_single_plot_success
assert
complex_expr
38
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 llm_sandbox.language_handlers.b...
FileType.PNG
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_language_handler_factory.py
test_handler_consistency_across_creation
assert
complex_expr
30
import logging from typing import TYPE_CHECKING import pytest from llm_sandbox.const import SupportedLanguage from llm_sandbox.exceptions import LanguageNotSupportedError from llm_sandbox.language_handlers.base import AbstractLanguageHandler, PlotOutput from llm_sandbox.language_handlers.cpp_handler import CppHandler...
handler2.name
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_pool_docker.py
test_init_with_session_kwargs
assert
complex_expr
25
from unittest.mock import MagicMock, patch from docker.errors import NotFound from llm_sandbox.const import SupportedLanguage from llm_sandbox.pool.config import PoolConfig from llm_sandbox.pool.docker_pool import DockerPoolManager class TestDockerPoolManagerInitialization: @patch("llm_sandbox.pool.docker_pool....
pool.session_kwargs
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_python_handler.py
test_inject_plot_detection_code
assert
func_call
27
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 llm_sandbox.language_handlers.b...
len(code)
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_exceptions.py
test_exception_message_contains_input
assert
func_call
43
from llm_sandbox.exceptions import ( CommandEmptyError, CommandFailedError, ContainerError, ExtraArgumentsError, ImageNotFoundError, ImagePullError, InvalidRegexPatternError, LanguageHandlerNotInitializedError, LanguageNotSupportedError, LanguageNotSupportPlotError, LibraryIn...
str(error)
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_pool_exceptions.py
test_init_without_timeout
assert
func_call
11
import pytest from llm_sandbox.pool.exceptions import PoolClosedError, PoolExhaustedError, PoolHealthCheckError class TestPoolExhaustedError: def test_init_without_timeout(self) -> None: """Test PoolExhaustedError initialization without timeout.""" error = PoolExhaustedError(pool_size=10) ...
str(error)
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vndee/llm-sandbox
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
train
train
tests/test_pool_exceptions.py
test_exceptions_have_unique_types
assert
func_call
14
import pytest from llm_sandbox.pool.exceptions import PoolClosedError, PoolExhaustedError, PoolHealthCheckError class TestExceptionIntegration: def test_exceptions_have_unique_types(self) -> None: """Test each exception has a unique type.""" exc1 = PoolExhaustedError(pool_size=10) exc2 = ...
type(exc2)
4eca42b64d7861ad8ce3b85282f334ce108c23af
36
v2_extractor_at_anchor
vstorm-co/full-stack-ai-agent-template
3c39c9ebdf55e35b68f4d9727add249e71cf7016
8
train
train
template/{{cookiecutter.project_slug}}/backend/tests/test_pipelines.py
test_default_values
assert
numeric_literal
11
import pytest from app.pipelines.base import BasePipeline, PipelineResult class TestPipelineResult: def test_default_values(self): """Test default values are set correctly.""" result = PipelineResult(processed=5) assert result.failed ==
0
3c39c9ebdf55e35b68f4d9727add249e71cf7016
8
v2_extractor_at_anchor
vstorm-co/full-stack-ai-agent-template
3c39c9ebdf55e35b68f4d9727add249e71cf7016
8
train
train
template/{{cookiecutter.project_slug}}/backend/tests/test_pipelines.py
test_custom_pipeline_implementation
assert
numeric_literal
37
import pytest from app.pipelines.base import BasePipeline, PipelineResult class TestBasePipeline: @pytest.mark.anyio async def test_custom_pipeline_implementation(self): """Test a custom pipeline implementation.""" class MyPipeline(BasePipeline): def __init__(self, items: list): ...
4
3c39c9ebdf55e35b68f4d9727add249e71cf7016
8
v2_extractor_at_anchor
vstorm-co/full-stack-ai-agent-template
3c39c9ebdf55e35b68f4d9727add249e71cf7016
8
train
train
template/{{cookiecutter.project_slug}}/backend/tests/test_pipelines.py
test_custom_pipeline_implementation
assert
numeric_literal
38
import pytest from app.pipelines.base import BasePipeline, PipelineResult class TestBasePipeline: @pytest.mark.anyio async def test_custom_pipeline_implementation(self): """Test a custom pipeline implementation.""" class MyPipeline(BasePipeline): def __init__(self, items: list): ...
1
3c39c9ebdf55e35b68f4d9727add249e71cf7016
8
v2_extractor_at_anchor
vstorm-co/full-stack-ai-agent-template
3c39c9ebdf55e35b68f4d9727add249e71cf7016
8
train
train
template/{{cookiecutter.project_slug}}/backend/tests/test_pipelines.py
test_default_values
assert
collection
12
import pytest from app.pipelines.base import BasePipeline, PipelineResult class TestPipelineResult: def test_default_values(self): """Test default values are set correctly.""" result = PipelineResult(processed=5) assert result.failed == 0 assert result.errors ==
[]
3c39c9ebdf55e35b68f4d9727add249e71cf7016
8
v2_extractor_at_anchor
vstorm-co/full-stack-ai-agent-template
3c39c9ebdf55e35b68f4d9727add249e71cf7016
8
train
train
template/{{cookiecutter.project_slug}}/backend/tests/test_pipelines.py
test_default_values
assert
collection
13
import pytest from app.pipelines.base import BasePipeline, PipelineResult class TestPipelineResult: def test_default_values(self): """Test default values are set correctly.""" result = PipelineResult(processed=5) assert result.failed == 0 assert result.errors == [] assert...
{}
3c39c9ebdf55e35b68f4d9727add249e71cf7016
8
v2_extractor_at_anchor
vstorm-co/full-stack-ai-agent-template
3c39c9ebdf55e35b68f4d9727add249e71cf7016
8
train
train
template/{{cookiecutter.project_slug}}/backend/tests/test_pipelines.py
test_success_rate_all_failed
assert
numeric_literal
11
import pytest from app.pipelines.base import BasePipeline, PipelineResult class TestPipelineResult: def test_success_rate_all_failed(self): """Test success rate when all items failed.""" result = PipelineResult(processed=0, failed=10) assert result.success_rate ==
0.0
3c39c9ebdf55e35b68f4d9727add249e71cf7016
8
v2_extractor_at_anchor
vstorm-co/full-stack-ai-agent-template
3c39c9ebdf55e35b68f4d9727add249e71cf7016
8
train
train
template/{{cookiecutter.project_slug}}/backend/tests/test_pipelines.py
test_success_rate_with_failures
assert
numeric_literal
11
import pytest from app.pipelines.base import BasePipeline, PipelineResult class TestPipelineResult: def test_success_rate_with_failures(self): """Test success rate with some failures.""" result = PipelineResult(processed=8, failed=2) assert result.success_rate ==
80.0
3c39c9ebdf55e35b68f4d9727add249e71cf7016
8
v2_extractor_at_anchor
vstorm-co/full-stack-ai-agent-template
3c39c9ebdf55e35b68f4d9727add249e71cf7016
8
train
train
template/{{cookiecutter.project_slug}}/backend/tests/test_pipelines.py
test_has_errors_with_failures
assert
bool_literal
11
import pytest from app.pipelines.base import BasePipeline, PipelineResult class TestPipelineResult: def test_has_errors_with_failures(self): """Test has_errors returns True when failures exist.""" result = PipelineResult(processed=5, failed=1) assert result.has_errors is
True
3c39c9ebdf55e35b68f4d9727add249e71cf7016
8
v2_extractor_at_anchor
vstorm-co/full-stack-ai-agent-template
3c39c9ebdf55e35b68f4d9727add249e71cf7016
8
train
train
template/{{cookiecutter.project_slug}}/backend/tests/test_pipelines.py
test_success_rate_all_processed
assert
numeric_literal
11
import pytest from app.pipelines.base import BasePipeline, PipelineResult class TestPipelineResult: def test_success_rate_all_processed(self): """Test success rate when all items processed.""" result = PipelineResult(processed=10, failed=0) assert result.success_rate ==
100.0
3c39c9ebdf55e35b68f4d9727add249e71cf7016
8
v2_extractor_at_anchor
vstorm-co/full-stack-ai-agent-template
3c39c9ebdf55e35b68f4d9727add249e71cf7016
8
train
train
template/{{cookiecutter.project_slug}}/backend/tests/test_pipelines.py
test_has_errors_no_errors
assert
bool_literal
11
import pytest from app.pipelines.base import BasePipeline, PipelineResult class TestPipelineResult: def test_has_errors_no_errors(self): """Test has_errors returns False when no errors.""" result = PipelineResult(processed=5, failed=0) assert result.has_errors is
False
3c39c9ebdf55e35b68f4d9727add249e71cf7016
8
v2_extractor_at_anchor
vstorm-co/full-stack-ai-agent-template
3c39c9ebdf55e35b68f4d9727add249e71cf7016
8
train
train
template/{{cookiecutter.project_slug}}/backend/tests/test_pipelines.py
test_run_must_be_implemented
pytest.raises
complex_expr
12
import pytest from app.pipelines.base import BasePipeline, PipelineResult class TestBasePipeline: @pytest.mark.anyio async def test_run_must_be_implemented(self): """Test that run method must be implemented by subclasses.""" # This test verifies the abstract method requirement with p...
TypeError, match="Can't instantiate abstract class")
3c39c9ebdf55e35b68f4d9727add249e71cf7016
8
v2_extractor_at_anchor
vstorm-co/full-stack-ai-agent-template
3c39c9ebdf55e35b68f4d9727add249e71cf7016
8
train
train
tests/test_cli.py
test_cli_help
assert
numeric_literal
28
from pathlib import Path from unittest.mock import MagicMock, patch import pytest from click.testing import CliRunner from fastapi_gen.cli import cli, create, main, new, templates from fastapi_gen.config import ( AuthType, BackgroundTaskType, CIType, DatabaseType, FrontendType, OAuthProvider, ...
0
3c39c9ebdf55e35b68f4d9727add249e71cf7016
8
v2_extractor_at_anchor
vstorm-co/full-stack-ai-agent-template
3c39c9ebdf55e35b68f4d9727add249e71cf7016
8
train
train
tests/test_cli.py
test_new_no_input_requires_name
assert
numeric_literal
28
from pathlib import Path from unittest.mock import MagicMock, patch import pytest from click.testing import CliRunner from fastapi_gen.cli import cli, create, main, new, templates from fastapi_gen.config import ( AuthType, BackgroundTaskType, CIType, DatabaseType, FrontendType, OAuthProvider, ...
1
3c39c9ebdf55e35b68f4d9727add249e71cf7016
8
v2_extractor_at_anchor
vstorm-co/full-stack-ai-agent-template
3c39c9ebdf55e35b68f4d9727add249e71cf7016
8
train
train
tests/test_config.py
test_default_rate_limit_values
assert
numeric_literal
28
from unittest.mock import patch import pytest from pydantic import ValidationError from fastapi_gen.config import ( AIFrameworkType, AuthType, BackgroundTaskType, CIType, DatabaseType, LLMProviderType, LogfireFeatures, OrmType, ProjectConfig, RateLimitStorageType, ReversePr...
60
3c39c9ebdf55e35b68f4d9727add249e71cf7016
8
v2_extractor_at_anchor
vstorm-co/full-stack-ai-agent-template
3c39c9ebdf55e35b68f4d9727add249e71cf7016
8
train
train
tests/test_config.py
test_custom_rate_limit_values
assert
numeric_literal
33
from unittest.mock import patch import pytest from pydantic import ValidationError from fastapi_gen.config import ( AIFrameworkType, AuthType, BackgroundTaskType, CIType, DatabaseType, LLMProviderType, LogfireFeatures, OrmType, ProjectConfig, RateLimitStorageType, ReversePr...
50
3c39c9ebdf55e35b68f4d9727add249e71cf7016
8
v2_extractor_at_anchor
vstorm-co/full-stack-ai-agent-template
3c39c9ebdf55e35b68f4d9727add249e71cf7016
8
train
train
tests/test_config.py
test_custom_rate_limit_values
assert
numeric_literal
34
from unittest.mock import patch import pytest from pydantic import ValidationError from fastapi_gen.config import ( AIFrameworkType, AuthType, BackgroundTaskType, CIType, DatabaseType, LLMProviderType, LogfireFeatures, OrmType, ProjectConfig, RateLimitStorageType, ReversePr...
30
3c39c9ebdf55e35b68f4d9727add249e71cf7016
8
v2_extractor_at_anchor
vstorm-co/full-stack-ai-agent-template
3c39c9ebdf55e35b68f4d9727add249e71cf7016
8
train
train
tests/test_config.py
test_default_rate_limit_values
assert
numeric_literal
27
from unittest.mock import patch import pytest from pydantic import ValidationError from fastapi_gen.config import ( AIFrameworkType, AuthType, BackgroundTaskType, CIType, DatabaseType, LLMProviderType, LogfireFeatures, OrmType, ProjectConfig, RateLimitStorageType, ReversePr...
100
3c39c9ebdf55e35b68f4d9727add249e71cf7016
8
v2_extractor_at_anchor
vstorm-co/full-stack-ai-agent-template
3c39c9ebdf55e35b68f4d9727add249e71cf7016
8
train
train
tests/test_config.py
test_returns_version_when_package_exists
assert
none_literal
29
from unittest.mock import patch import pytest from pydantic import ValidationError from fastapi_gen.config import ( AIFrameworkType, AuthType, BackgroundTaskType, CIType, DatabaseType, LLMProviderType, LogfireFeatures, OrmType, ProjectConfig, RateLimitStorageType, ReversePr...
None
3c39c9ebdf55e35b68f4d9727add249e71cf7016
8
v2_extractor_at_anchor