repo_id
stringclasses
409 values
prefix
large_stringlengths
34
36.3k
target
large_stringlengths
1
498
assertion_type
stringclasses
31 values
difficulty
stringclasses
8 values
test_file
stringlengths
10
121
test_function
stringlengths
1
104
test_class
stringlengths
0
51
lineno
int32
2
11.3k
commit_idx
int32
vndee/llm-sandbox
import io import shlex 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_...
1
assert
numeric_literal
tests/test_docker.py
test_execute_command_no_workdir
TestDockerContainerAPI
860
null
vndee/llm-sandbox
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
assert
variable
tests/test_k8s_utils.py
test_no_retry_on_generic_exception
TestRetryK8sApiCall
71
null
vndee/llm-sandbox
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
assert
variable
tests/test_pool_session.py
test_run_delegates
TestPooledSandboxSessionExecution
191
null
vndee/llm-sandbox
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...
install_cmd
assert
variable
tests/test_dynamic_paths.py
test_python_writable_workspace
TestReadOnlyFilesystemSupport
215
null
vndee/llm-sandbox
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
assert
complex_expr
tests/test_python_handler.py
test_extract_single_plot_success
TestPythonHandler
188
null
vndee/llm-sandbox
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...
True
assert
bool_literal
tests/test_backend.py
test_docker_specific_features
TestBackendSpecificFeatures
234
null
vndee/llm-sandbox
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 TestPythonHandlerDynamicPaths: def test_execution_commands_with_context_default_workdir(self) -> No...
1
assert
numeric_literal
tests/test_dynamic_paths.py
test_execution_commands_with_context_default_workdir
TestPythonHandlerDynamicPaths
25
null
vndee/llm-sandbox
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)
assert
func_call
tests/test_pool_exceptions.py
test_exceptions_have_unique_types
TestExceptionIntegration
156
null
vndee/llm-sandbox
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)
assert
func_call
tests/test_pool_exceptions.py
test_init_without_timeout
TestPoolExhaustedError
14
null
vndee/llm-sandbox
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...
"png"
assert
string_literal
tests/test_data.py
test_file_type_values
TestFileType
150
null
vndee/llm-sandbox
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...
2
assert
numeric_literal
tests/test_data.py
test_execution_result_with_plots
TestExecutionResult
124
null
vndee/llm-sandbox
import pytest from pydantic import ValidationError from llm_sandbox.pool.config import ExhaustionStrategy, PoolConfig class TestExhaustionStrategy: def test_enum_iteration(self) -> None: """Test iterating over enum.""" strategies = list(ExhaustionStrategy) assert len(strategies) ==
3
assert
numeric_literal
tests/test_pool_config.py
test_enum_iteration
TestExhaustionStrategy
27
null
vndee/llm-sandbox
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...
"pdf"
assert
string_literal
tests/test_data.py
test_file_type_values
TestFileType
152
null
vndee/llm-sandbox
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_get_execution_commands(self) -> None: """Test getting execution commands.""" ...
1
assert
numeric_literal
tests/test_javascript_handler.py
test_get_execution_commands
TestJavaScriptHandler
192
null
vndee/llm-sandbox
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
assert
variable
tests/test_python_handler.py
test_extract_plots_success
TestPythonHandler
150
null
vndee/llm-sandbox
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
assert
none_literal
tests/test_java_handler.py
test_init
TestJavaHandler
22
null
vndee/llm-sandbox
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
assert
variable
tests/test_pool_docker.py
test_init_with_default_client
TestDockerPoolManagerInitialization
25
null
vndee/llm-sandbox
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_get_execution_commands(self) -> None: """Test getting execution commands.""" handler = GoHandle...
1
assert
numeric_literal
tests/test_go_handler.py
test_get_execution_commands
TestGoHandler
211
null
vndee/llm-sandbox
import io import shlex 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_...
True
assert
bool_literal
tests/test_docker.py
test_init_with_custom_params
TestSandboxDockerSessionInit
90
null
vndee/llm-sandbox
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...
1
assert
numeric_literal
tests/test_pool_base.py
test_recycling_on_release
TestContainerPoolManager
162
null
vndee/llm-sandbox
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
assert
none_literal
tests/test_javascript_handler.py
test_init
TestJavaScriptHandler
22
null
vndee/llm-sandbox
from llm_sandbox.exceptions import ( CommandEmptyError, CommandFailedError, ContainerError, ExtraArgumentsError, ImageNotFoundError, ImagePullError, InvalidRegexPatternError, LanguageHandlerNotInitializedError, LanguageNotSupportedError, LanguageNotSupportPlotError, LibraryIn...
message
assert
variable
tests/test_exceptions.py
test_command_failed_error_formatting
TestExceptionMessageFormatting
387
null
vndee/llm-sandbox
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 TestBackendC...
"python"
assert
string_literal
tests/test_backend.py
test_all_backends_accept_common_parameters
TestBackendCommonInterface
199
null
vndee/llm-sandbox
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...
0
assert
numeric_literal
tests/test_interactive_session.py
test_run_executes_code_and_returns_output
167
null
vndee/llm-sandbox
import logging import os 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....
setup_code
assert
variable
tests/test_r_handler.py
test_plot_detection_setup_content
TestRHandler
446
null
vndee/llm-sandbox
from dataclasses import dataclass from typing import Any import pytest from llm_sandbox import SandboxSession from llm_sandbox.security import RestrictedModule, SecurityIssueSeverity, SecurityPattern, SecurityPolicy pytestmark = pytest.mark.usefixtures("mock_docker_backend") def comprehensive_security_policy() -> S...
1
assert
numeric_literal
tests/test_advanced_security_scenarios.py
test_python_code_injection_via_eval
TestCodeInjectionAttacks
431
null
vndee/llm-sandbox
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 ...
1
assert
numeric_literal
tests/test_k8s_utils.py
test_no_retry_on_other_api_exception
TestRetryK8sApiCall
60
null
vndee/llm-sandbox
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
assert
variable
tests/test_java_handler.py
test_run_with_artifacts_no_plotting_support
TestJavaHandler
56
null
vndee/llm-sandbox
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
assert
variable
tests/test_data.py
test_plot_output_equality
TestPlotOutput
98
null
vndee/llm-sandbox
import warnings from llm_sandbox.data import ConsoleOutput, ExecutionResult, FileType, PlotOutput class TestDataClassDefaults: def test_console_output_defaults(self) -> None: """Test ConsoleOutput with default values.""" # Test with all defaults output = ConsoleOutput() assert out...
""
assert
string_literal
tests/test_data_missing.py
test_console_output_defaults
TestDataClassDefaults
225
null
vndee/llm-sandbox
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
assert
variable
tests/test_cpp_handler.py
test_run_with_artifacts_no_plotting_support
TestCppHandler
56
null
vndee/llm-sandbox
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...
2
assert
numeric_literal
tests/test_pool_base.py
test_close_cleanup
TestContainerPoolManager
213
null
vndee/llm-sandbox
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 ...
2
assert
numeric_literal
tests/test_plot_clearing.py
test_clear_plots_parameter
TestPlotClearing
99
null
vndee/llm-sandbox
import io import shlex 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_...
"1"
assert
string_literal
tests/test_docker.py
test_env_dict_preserves_user_vars
TestPythonUnbufferedEnvInjection
1,709
null
vndee/llm-sandbox
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...
1
assert
numeric_literal
tests/test_data.py
test_console_output_with_error
TestConsoleOutput
40
null
vndee/llm-sandbox
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)
assert_*
variable
tests/test_interactive_session.py
test_execute_commands_delegation
433
null
vndee/llm-sandbox
import base64 import io import logging import tarfile from unittest.mock import MagicMock, 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, ...
1
assert
numeric_literal
tests/test_base_handler.py
test_plot_detection_config
TestMissingCoverage
190
null
vndee/llm-sandbox
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...
[]
assert
collection
tests/test_ruby_handler.py
test_run_with_artifacts_no_plotting_support
TestRubyHandler
57
null
vndee/llm-sandbox
import pytest from llm_sandbox.const import DefaultImage, SandboxBackend, StrEnum, SupportedLanguage class TestSupportedLanguage: def test_all_languages(self) -> None: """Test all language values.""" assert SupportedLanguage.PYTHON == "python" assert SupportedLanguage.JAVA == "java" ...
"ruby"
assert
string_literal
tests/test_const.py
test_all_languages
TestSupportedLanguage
110
null
vndee/llm-sandbox
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
assert
none_literal
tests/test_podman.py
test_init_with_defaults
TestSandboxPodmanSessionInit
52
null
vndee/llm-sandbox
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_get_execution_commands(self) -> None: """Test getting execution commands.""" handler = Ja...
1
assert
numeric_literal
tests/test_java_handler.py
test_get_execution_commands
TestJavaHandler
172
null
vndee/llm-sandbox
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...
"rb"
assert
string_literal
tests/test_language_handler_factory.py
test_create_ruby_handler
TestLanguageHandlerFactory
73
null
vndee/llm-sandbox
import logging import os 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....
True
assert
bool_literal
tests/test_r_handler.py
test_init
TestRHandler
26
null
vndee/llm-sandbox
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
assert
none_literal
tests/test_libraries_param.py
test_pool_manager_passes_libraries_to_session
TestPoolManagerLibrariesParameter
36
null
vndee/llm-sandbox
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, TimeoutMixin from llm_sandbox.data import ConsoleOutput from llm_sandbox.exceptions import CommandEmptyError, Not...
"ls")
assert_*
string_literal
tests/test_mixins.py
test_execute_command_success
TestCommandExecutionMixin
394
null
vndee/llm-sandbox
import pytest from llm_sandbox.const import DefaultImage, SandboxBackend, StrEnum, SupportedLanguage class TestSupportedLanguage: def test_language_iteration(self) -> None: """Test iterating over languages.""" languages = list(SupportedLanguage) assert len(languages) ==
7
assert
numeric_literal
tests/test_const.py
test_language_iteration
TestSupportedLanguage
115
null
vndee/llm-sandbox
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...
"arg2")
assert_*
string_literal
tests/test_session.py
test_getattr_delegation
TestArtifactSandboxSession
200
null
vndee/llm-sandbox
from collections.abc import Generator from typing import Any from unittest.mock import MagicMock, patch import pytest from llm_sandbox.docker import SandboxDockerSession from llm_sandbox.session import SandboxSession def mock_docker_client() -> MagicMock: """Create a mock Docker client.""" return MagicMock()...
original
assert
variable
tests/test_encoding_errors.py
test_surrogateescape_roundtrips
TestEncodingErrors
63
null
vndee/llm-sandbox
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
assert
variable
tests/test_language_handler_factory.py
test_handler_consistency_across_creation
TestLanguageHandlerFactory
197
null
vndee/llm-sandbox
import logging import os 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....
[]
assert
collection
tests/test_r_handler.py
test_run_with_artifacts_without_plotting
TestRHandler
109
null
vndee/llm-sandbox
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
assert
variable
tests/test_java_handler.py
test_inject_plot_detection_code
TestJavaHandler
38
null
vndee/llm-sandbox
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...
True
assert
bool_literal
tests/test_interactive_session.py
test_wait_for_remote_file_success
614
null
vndee/llm-sandbox
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 TestMicromambaSessionInit: @patch("llm_sandbox.micromamba.docker.from_env") @patch("llm_sandbox....
2
assert
numeric_literal
tests/test_micromamba.py
test_init_with_all_docker_session_params
TestMicromambaSessionInit
103
null
vndee/llm-sandbox
from collections.abc import Generator from typing import Any from unittest.mock import MagicMock, patch import pytest from llm_sandbox.docker import SandboxDockerSession from llm_sandbox.session import SandboxSession def mock_docker_client() -> MagicMock: """Create a mock Docker client.""" return MagicMock()...
stderr
assert
variable
tests/test_encoding_errors.py
test_stderr_also_uses_encoding_errors
TestEncodingErrors
88
null
vndee/llm-sandbox
from collections.abc import Generator from unittest.mock import MagicMock, Mock, patch from llm_sandbox.data import ConsoleOutput, StreamCallback from llm_sandbox.docker import SandboxDockerSession class TestDockerStreamOutputCallbacks: @patch("llm_sandbox.docker.docker.from_env") @patch("llm_sandbox.languag...
""
assert
string_literal
tests/test_streaming_callbacks.py
test_stdout_callback_invoked_per_chunk
TestDockerStreamOutputCallbacks
73
null
temporalio/sdk-python
import dataclasses import json import multiprocessing import multiprocessing.context import os import uuid from collections.abc import Mapping from datetime import datetime, timedelta, timezone from typing import Any, cast from unittest import mock import google.protobuf.any_pb2 import pytest from google.protobuf impo...
val_1
assert
variable
tests/test_client.py
update_search_attributes
1,339
null
temporalio/sdk-python
import dataclasses import uuid from collections.abc import Sequence from datetime import date, datetime, time, timedelta, timezone from ipaddress import IPv4Address from pathlib import Path from typing import ( Annotated, Any, Generic, TypeVar, cast, ) from annotated_types import Len from pydantic ...
dt
assert
variable
tests/contrib/pydantic/models.py
_check_instance
SpecialTypesModel
65
null
temporalio/sdk-python
import urllib.parse from typing import Any import nexusrpc import pytest import temporalio.api.common.v1 import temporalio.api.enums.v1 import temporalio.nexus._link_conversion def test_link_conversion_utilities(): p2c = temporalio.nexus._link_conversion._event_type_pascal_case_to_constant_case c2p = tempora...
p
assert
variable
tests/nexus/test_link_conversion.py
test_link_conversion_utilities
203
null
temporalio/sdk-python
import dataclasses import uuid import warnings from collections.abc import AsyncIterator, Awaitable, Callable from contextlib import AbstractAsyncContextManager, asynccontextmanager from typing import cast import pytest import temporalio.bridge.temporal_sdk_bridge import temporalio.client import temporalio.converter ...
ValueError)
pytest.raises
variable
tests/test_plugins.py
test_simple_plugins_callables
351
null
temporalio/sdk-python
import re from collections.abc import Mapping from datetime import timedelta from typing import Any, cast import pytest from google.protobuf.empty_pb2 import Empty from google.protobuf.timestamp_pb2 import Timestamp from grpc.aio import ServicerContext from grpc.aio import server as grpc_server from temporalio.api.op...
TypeError)
pytest.raises
variable
tests/api/test_grpc_stub.py
test_grpc_metadata
215
null
temporalio/sdk-python
import asyncio import json import os import sys import uuid from collections.abc import AsyncIterator, Callable, Sequence from dataclasses import dataclass from datetime import timedelta from typing import ( Any, cast, ) import nexusrpc import pydantic import pytest from agents import ( Agent, AgentBas...
8
assert
numeric_literal
tests/contrib/openai_agents/test_openai.py
test_customer_service_workflow
1,048
null
temporalio/sdk-python
from dataclasses import dataclass from typing import Any import nexusrpc.handler import pytest from temporalio import nexus from temporalio.nexus import WorkflowRunOperationContext, workflow_run_operation from temporalio.nexus._util import get_operation_factory @pytest.mark.parametrize( "test_case", [ ...
"Service"
assert
string_literal
tests/nexus/test_handler_operation_definitions.py
test_collected_operation_names
95
null
temporalio/sdk-python
import re from collections.abc import Mapping from datetime import timedelta from typing import Any, cast import pytest from google.protobuf.empty_pb2 import Empty from google.protobuf.timestamp_pb2 import Timestamp from grpc.aio import ServicerContext from grpc.aio import server as grpc_server from temporalio.api.op...
v
assert
variable
tests/api/test_grpc_stub.py
assert_last_metadata
SimpleWorkflowServer
46
null
temporalio/sdk-python
from __future__ import annotations import dataclasses import inspect import ipaddress import logging import sys import traceback from collections import deque from collections.abc import Iterable, Mapping, MutableMapping, Sequence from dataclasses import dataclass from datetime import datetime, timedelta, timezone fro...
output
assert
variable
tests/test_converter.py
test_exception_format
525
null
temporalio/sdk-python
from __future__ import annotations import pickle from dataclasses import dataclass from datetime import timedelta from typing import Any import pytest from temporalio.api.common.v1 import Payload from temporalio.common import ( Priority, RawValue, RetryPolicy, SearchAttributeKey, SearchAttributeP...
MyCallableClass())
assert_*
func_call
tests/test_common.py
test_type_hints_from_func
70
null
temporalio/sdk-python
from __future__ import annotations import dataclasses import inspect import ipaddress import logging import sys import traceback from collections import deque from collections.abc import Iterable, Mapping, MutableMapping, Sequence from dataclasses import dataclass from datetime import datetime, timedelta, timezone fro...
value
assert
variable
tests/test_converter.py
ok
342
null
temporalio/sdk-python
from __future__ import annotations import asyncio import dataclasses import functools import inspect import os import sys import time import uuid from collections.abc import Callable, Sequence from dataclasses import dataclass from datetime import date, datetime, timedelta from enum import IntEnum from typing import A...
InstanceCheckEnum.BAR
assert
complex_expr
tests/worker/workflow_sandbox/test_runner.py
instance_check_activity
346
null
temporalio/sdk-python
import asyncio import logging import logging.handlers import queue import socket import time import uuid from collections.abc import Awaitable, Callable, Iterator, Sequence from contextlib import closing, contextmanager from dataclasses import dataclass from datetime import datetime, timedelta, timezone from typing imp...
await fn()
assert
func_call
tests/helpers/__init__.py
check
94
null
temporalio/sdk-python
from __future__ import annotations import pickle from dataclasses import dataclass from datetime import timedelta from typing import Any import pytest from temporalio.api.common.v1 import Payload from temporalio.common import ( Priority, RawValue, RetryPolicy, SearchAttributeKey, SearchAttributeP...
{"meta-key": b"meta-val"}
assert
collection
tests/test_common.py
test_raw_value_pickle
83
null
temporalio/sdk-python
from __future__ import annotations import asyncio import concurrent.futures import multiprocessing import multiprocessing.context import uuid from collections.abc import Awaitable, Callable, Sequence from datetime import timedelta from typing import Any from urllib.request import urlopen import nexusrpc import pytest...
val2
assert
variable
tests/worker/test_worker.py
test_load_default_worker_binary_id
73
null
temporalio/sdk-python
from __future__ import annotations import asyncio import uuid from collections.abc import Mapping from dataclasses import dataclass from datetime import timedelta from enum import Enum, IntEnum from typing import Any from unittest.mock import patch import pytest import temporalio.api.common.v1 import temporalio.api....
RPCError)
pytest.raises
variable
tests/worker/test_update_with_start.py
test_start_update_with_start_empty_details
833
null
temporalio/sdk-python
from __future__ import annotations import asyncio import concurrent.futures import dataclasses import threading import uuid from collections.abc import Awaitable, Callable from dataclasses import dataclass from datetime import datetime, timezone from enum import IntEnum from typing import Any from urllib.request impor...
5
assert
numeric_literal
tests/nexus/test_workflow_caller.py
test_sync_response
1,042
null
temporalio/sdk-python
from __future__ import annotations import asyncio import concurrent.futures import dataclasses import threading import uuid from collections.abc import Awaitable, Callable from dataclasses import dataclass from datetime import datetime, timezone from enum import IntEnum from typing import Any from urllib.request impor...
None
assert
none_literal
tests/nexus/test_workflow_caller.py
test_request_deadline_is_accessible_in_operation
2,276
null
temporalio/sdk-python
from __future__ import annotations import dataclasses import inspect import ipaddress import logging import sys import traceback from collections import deque from collections.abc import Iterable, Mapping, MutableMapping, Sequence from dataclasses import dataclass from datetime import datetime, timedelta, timezone fro...
2
assert
numeric_literal
tests/test_converter.py
test_exception_format
527
null
temporalio/sdk-python
import inspect import os import re from collections.abc import Callable, Mapping from datetime import timedelta from typing import Any import google.protobuf.empty_pb2 import google.protobuf.message import google.protobuf.symbol_database import grpc import pytest from google.protobuf.descriptor import FileDescriptor, ...
tls_config
assert
variable
tests/test_service.py
test_connect_config_tls_explicit_config_preserved
219
null
temporalio/sdk-python
import uuid from datetime import timedelta from typing import Any import opentelemetry.trace from agents import Span, Trace, TracingProcessor, custom_span, trace from agents.tracing import get_trace_provider from opentelemetry.sdk.trace import ReadableSpan from opentelemetry.sdk.trace.export import SimpleSpanProcessor...
None
assert
none_literal
tests/contrib/openai_agents/test_openai_tracing.py
test_external_trace_to_workflow_spans
347
null
temporalio/sdk-python
import asyncio import uuid from dataclasses import dataclass from datetime import timedelta import pytest from temporalio import activity, workflow from temporalio.client import ( ActivityExecutionCount, ActivityExecutionCountAggregationGroup, ActivityExecutionDescription, ActivityExecutionStatus, ...
2
assert
numeric_literal
tests/test_activity.py
test_get_activity_handle
488
null
temporalio/sdk-python
from __future__ import annotations import asyncio import gc import logging import queue import threading import uuid from collections.abc import Callable, Generator, Iterable from concurrent.futures import ThreadPoolExecutor from contextlib import contextmanager from dataclasses import dataclass from datetime import t...
0
assert
numeric_literal
tests/contrib/opentelemetry/test_opentelemetry.py
test_opentelemetry_always_create_workflow_spans
590
null
temporalio/sdk-python
def hello_mock_model(): return TestModel.returning_responses([ResponseBuilders.output_message("test")]) async def get_weather(city: str) -> Weather: """ Get the weather for a given city. """ return Weather(city=city, temperature_range="14-20C", conditions="Sunny with wind.") async def get_weather_...
2
assert
numeric_literal
tests/contrib/openai_agents/test_openai.py
test_multiple_handoffs_workflow
2,675
null
temporalio/sdk-python
from __future__ import annotations import pickle from dataclasses import dataclass from datetime import timedelta from typing import Any import pytest from temporalio.api.common.v1 import Payload from temporalio.common import ( Priority, RawValue, RetryPolicy, SearchAttributeKey, SearchAttributeP...
TypeError)
pytest.raises
variable
tests/test_common.py
test_cant_construct_bad_priority
122
null
temporalio/sdk-python
from __future__ import annotations import dataclasses import inspect import ipaddress import logging import sys import traceback from collections import deque from collections.abc import Iterable, Mapping, MutableMapping, Sequence from dataclasses import dataclass from datetime import datetime, timedelta, timezone fro...
1
assert
numeric_literal
tests/test_converter.py
assert_payload
109
null
temporalio/sdk-python
import dataclasses import sys import pytest from temporalio import workflow from temporalio.worker.workflow_sandbox._importer import ( Importer, _thread_local_sys_modules, _ThreadLocalSysModules, ) from temporalio.worker.workflow_sandbox._restrictions import ( RestrictedWorkflowAccessError, Restri...
id(inside1)
assert
func_call
tests/worker/workflow_sandbox/test_importer.py
test_workflow_sandbox_importer_passthrough_all_modules
74
null
temporalio/sdk-python
import asyncio import platform import uuid from datetime import datetime, timedelta, timezone from time import monotonic from typing import Any import pytest from temporalio import activity, workflow from temporalio.client import ( Client, Interceptor, OutboundInterceptor, StartWorkflowInput, Work...
str(err.value)
assert
func_call
tests/testing/test_workflow.py
test_search_attributes_on_dev_server
295
null
temporalio/sdk-python
from __future__ import annotations import asyncio import dataclasses import functools import inspect import os import sys import time import uuid from collections.abc import Callable, Sequence from dataclasses import dataclass from datetime import date, datetime, timedelta from enum import IntEnum from typing import A...
await handle.result()
assert
func_call
tests/worker/workflow_sandbox/test_runner.py
test_workflow_sandbox_global_state
141
null
temporalio/sdk-python
import asyncio import json import os import sys import uuid from collections.abc import AsyncIterator, Callable, Sequence from dataclasses import dataclass from datetime import timedelta from typing import ( Any, cast, ) import nexusrpc import pydantic import pytest from agents import ( Agent, AgentBas...
None
assert
none_literal
tests/contrib/openai_agents/test_openai.py
update_seat
826
null
temporalio/sdk-python
Get the weather for a given city. """ return Weather(city=city, temperature_range="14-20C", conditions=ctx.context) def weather_mock_model(): return TestModel.returning_responses( [ ResponseBuilders.tool_call('{"city":"Tokyo"}', "get_weather"), ResponseBuilders.tool_call...
0
assert
numeric_literal
tests/contrib/openai_agents/test_openai.py
test_mcp_server
2,377
null
temporalio/sdk-python
import asyncio import random import re import sys import uuid from dataclasses import dataclass from datetime import timedelta from pathlib import Path from typing import Any import pytest from temporalio import activity, workflow from temporalio.client import Client, WorkflowFailureError, WorkflowHistory from tempor...
waiting)
assert_*
variable
tests/worker/test_replayer.py
test_replayer_workflow_incomplete
130
null
temporalio/sdk-python
import urllib.parse from typing import Any import nexusrpc import pytest import temporalio.api.common.v1 import temporalio.api.enums.v1 import temporalio.nexus._link_conversion def test_link_conversion_utilities(): p2c = temporalio.nexus._link_conversion._event_type_pascal_case_to_constant_case c2p = tempora...
c
assert
variable
tests/nexus/test_link_conversion.py
test_link_conversion_utilities
202
null
temporalio/sdk-python
import dataclasses import datetime import os import pathlib import uuid import pydantic import pytest from pydantic import BaseModel from temporalio.client import Client from temporalio.contrib.pydantic import pydantic_data_converter from temporalio.worker import Worker from temporalio.worker.workflow_sandbox._restri...
pydantic.ValidationError)
pytest.raises
complex_expr
tests/contrib/pydantic/test_pydantic.py
test_validation_error
332
null
temporalio/sdk-python
import uuid from dataclasses import dataclass from datetime import datetime, timezone from typing import Any import nexusrpc import pytest from nexusrpc import Operation, service from nexusrpc.handler import ( OperationHandler, StartOperationContext, StartOperationResultAsync, service_handler, ) from n...
1
assert
numeric_literal
tests/nexus/test_workflow_run_operation.py
test_request_deadline_is_accessible_in_workflow_run_operation
183
null
temporalio/sdk-python
import inspect import itertools import typing from collections.abc import Callable, Sequence from typing import Any, get_type_hints import pytest from temporalio import workflow from temporalio.common import RawValue, VersioningBehavior def test_workflow_defn_bad(): with pytest.raises(
ValueError)
pytest.raises
variable
tests/test_workflow.py
test_workflow_defn_bad
253
null
temporalio/sdk-python
from __future__ import annotations import pickle from dataclasses import dataclass from datetime import timedelta from typing import Any import pytest from temporalio.api.common.v1 import Payload from temporalio.common import ( Priority, RawValue, RetryPolicy, SearchAttributeKey, SearchAttributeP...
b"data-val"
assert
string_literal
tests/test_common.py
test_raw_value_pickle
84
null
temporalio/sdk-python
from __future__ import annotations import dataclasses import inspect import ipaddress import logging import sys import traceback from collections import deque from collections.abc import Iterable, Mapping, MutableMapping, Sequence from dataclasses import dataclass from datetime import datetime, timedelta, timezone fro...
proto
assert
variable
tests/test_converter.py
test_binary_proto
252
null
temporalio/sdk-python
import dataclasses import json import multiprocessing import multiprocessing.context import os import uuid from collections.abc import Mapping from datetime import datetime, timedelta, timezone from typing import Any, cast from unittest import mock import google.protobuf.any_pb2 import pytest from google.protobuf impo...
[5, 7]
assert
collection
tests/test_client.py
test_schedule_backfill
1,161
null
temporalio/sdk-python
import dataclasses import json import multiprocessing import multiprocessing.context import os import uuid from collections.abc import Mapping from datetime import datetime, timedelta, timezone from typing import Any, cast from unittest import mock import google.protobuf.any_pb2 import pytest from google.protobuf impo...
"1.0"
assert
string_literal
tests/test_client.py
test_build_id_interactions
1,450
null
temporalio/sdk-python
import logging import logging.handlers import queue import re import uuid from datetime import timedelta from typing import cast from urllib.request import urlopen import pytest from temporalio import workflow from temporalio.client import Client from temporalio.runtime import ( LogForwardingConfig, LoggingCo...
new_runtime
assert
variable
tests/test_runtime.py
test_runtime_ref_set_default
326
null
temporalio/sdk-python
from __future__ import annotations import asyncio import concurrent.futures import dataclasses import threading import uuid from collections.abc import Awaitable, Callable from dataclasses import dataclass from datetime import datetime, timezone from enum import IntEnum from typing import Any from urllib.request impor...
"success"
assert
string_literal
tests/nexus/test_workflow_caller.py
test_nexus_operation_summary
1,599
null
temporalio/sdk-python
import asyncio import uuid from dataclasses import dataclass from datetime import timedelta import pytest from temporalio import activity, workflow from temporalio.client import ( ActivityExecutionCount, ActivityExecutionCountAggregationGroup, ActivityExecutionDescription, ActivityExecutionStatus, ...
7
assert
numeric_literal
tests/test_activity.py
test_manual_completion
641
null
temporalio/sdk-python
import dataclasses import logging import uuid import warnings from dataclasses import dataclass from datetime import timedelta import pytest import temporalio import temporalio.converter from temporalio import activity, workflow from temporalio.client import Client, WorkflowFailureError from temporalio.converter impo...
str(w[-1].message)
assert
func_call
tests/worker/test_payload_size_limits.py
test_payload_size_warning_workflow_input
127
null
temporalio/sdk-python
import logging import logging.handlers import queue import re import uuid from datetime import timedelta from typing import cast from urllib.request import urlopen import pytest from temporalio import workflow from temporalio.client import Client from temporalio.runtime import ( LogForwardingConfig, LoggingCo...
logging.WARNING
assert
complex_expr
tests/test_runtime.py
test_runtime_task_fail_log_forwarding
193
null