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
temporalio/sdk-python
import uuid import nexusrpc import nexusrpc.handler import pytest from temporalio import nexus, workflow from temporalio.client import Client from temporalio.testing import WorkflowEnvironment from temporalio.worker import Worker from tests.helpers.nexus import make_nexus_endpoint_name async def test_run_nexus_servi...
6
assert
numeric_literal
tests/nexus/test_dynamic_creation_of_user_handler_classes.py
test_run_nexus_service_from_programmatically_created_service_handler
91
null
temporalio/sdk-python
from __future__ import annotations import asyncio import concurrent.futures import uuid from collections import Counter from collections.abc import Sequence from dataclasses import dataclass from datetime import timedelta from logging import getLogger from typing import Any import nexusrpc import nexusrpc.handler imp...
2
assert
numeric_literal
tests/nexus/test_workflow_caller_errors.py
test_nexus_operation_retried_on_codec_decode_failure
782
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...
ValueError)
pytest.raises
variable
tests/worker/test_worker.py
test_cant_specify_max_concurrent_and_tuner
304
null
temporalio/sdk-python
from __future__ import annotations import asyncio import concurrent.futures import uuid from collections import Counter from collections.abc import Sequence from dataclasses import dataclass from datetime import timedelta from logging import getLogger from typing import Any import nexusrpc import nexusrpc.handler imp...
None
assert
none_literal
tests/nexus/test_workflow_caller_errors.py
test_error_raised_by_timeout_of_nexus_start_operation
362
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....
str(exc_info.value)
assert
func_call
tests/worker/test_update_with_start.py
test_with_start_workflow_operation_cannot_be_reused
98
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...
"test"
assert
string_literal
tests/nexus/test_workflow_run_operation.py
test_workflow_run_operation
155
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...
RPCError)
pytest.raises
variable
tests/testing/test_workflow.py
test_search_attributes_on_dev_server
288
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...
"local-corp"
assert
string_literal
tests/contrib/opentelemetry/test_opentelemetry.py
test_opentelemetry_baggage_propagation_local_activity
772
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 ...
None
assert
none_literal
tests/test_plugins.py
test_simple_plugin_worker_interceptor_only_used_on_worker
462
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 ...
[HelloWorkflow2]
assert
collection
tests/test_plugins.py
test_simple_plugins
322
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...
activity_id)
assert_*
variable
tests/helpers/__init__.py
check_paused
277
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...
None
assert
none_literal
tests/contrib/opentelemetry/test_opentelemetry.py
test_opentelemetry_safe_detach
989
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...
ValueError)
pytest.raises
variable
tests/test_common.py
test_typed_search_attribute_duplicates
96
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", [ ...
expected_op.output_type
assert
complex_expr
tests/nexus/test_handler_operation_definitions.py
test_collected_operation_names
101
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, ...
0
assert
numeric_literal
tests/test_activity.py
test_describe
TestDescribe
110
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...
"IN WITH"
assert
string_literal
tests/worker/test_worker.py
test_worker_fatal_error_with
153
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....
ValueError)
pytest.raises
variable
tests/worker/test_update_with_start.py
test_with_start_workflow_operation_requires_conflict_policy
520
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...
thread_local | {"bar": 456}
assert
complex_expr
tests/worker/workflow_sandbox/test_importer.py
test_thread_local_sys_module_attrs
155
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...
err.value.cause.message
assert
complex_expr
tests/worker/workflow_sandbox/test_runner.py
test_workflow_sandbox_import_errors
615
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...
"success"
assert
string_literal
tests/contrib/opentelemetry/test_opentelemetry.py
test_opentelemetry_interceptor_works_if_no_context
936
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", [ ...
expected_op.input_type
assert
complex_expr
tests/nexus/test_handler_operation_definitions.py
test_collected_operation_names
100
null
temporalio/sdk-python
ModelActivityParameters, StatefulMCPServerProvider, StatelessMCPServerProvider, ) from temporalio.contrib.openai_agents._model_parameters import ModelSummaryProvider from temporalio.contrib.openai_agents._openai_runner import _convert_agent from temporalio.contrib.openai_agents._temporal_model_stub import (...
"test"
assert
string_literal
tests/contrib/openai_agents/test_openai.py
test_local_hello_world_agent
2,554
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...
await handle.result()
assert
func_call
tests/worker/test_replayer.py
test_replayer_workflow_complete
97
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...
"some-corp"
assert
string_literal
tests/contrib/opentelemetry/test_opentelemetry.py
test_opentelemetry_baggage_propagation_basic
726
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...
"A"
assert
string_literal
tests/nexus/test_link_conversion.py
test_link_conversion_utilities
205
null
temporalio/sdk-python
import os import textwrap from pathlib import Path import pytest from temporalio.client import Client from temporalio.envconfig import ClientConfig, ClientConfigProfile, ClientConfigTLS from temporalio.service import TLSConfig TOML_CONFIG_BASE = textwrap.dedent( """ [profile.default] address = "default-a...
True
assert
bool_literal
tests/test_envconfig.py
test_load_profile_api_key_enables_tls
232
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 ...
3
assert
numeric_literal
tests/contrib/pydantic/models.py
_check_instance
ParentModel
125
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(inside)
assert
func_call
tests/worker/workflow_sandbox/test_importer.py
test_workflow_sandbox_importer_passthough_context_manager
65
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...
[]
assert
collection
tests/test_client.py
test_build_id_interactions
1,480
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(outside1)
assert
func_call
tests/worker/workflow_sandbox/test_importer.py
test_workflow_sandbox_importer_passthrough_module
48
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", [ ...
expected_op.name
assert
complex_expr
tests/nexus/test_handler_operation_definitions.py
test_collected_operation_names
99
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(outside2)
assert
func_call
tests/worker/workflow_sandbox/test_importer.py
test_workflow_sandbox_importer_passthrough_module
56
null
temporalio/sdk-python
from __future__ import annotations import asyncio import concurrent.futures import uuid from collections import Counter from collections.abc import Sequence from dataclasses import dataclass from datetime import timedelta from logging import getLogger from typing import Any import nexusrpc import nexusrpc.handler imp...
str(handler_error)
assert
func_call
tests/nexus/test_workflow_caller_errors.py
test_nexus_operation_fails_without_retry_as_handler_error
272
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...
"2.0"
assert
string_literal
tests/worker/test_worker.py
run
DeploymentVersioningWorkflowV2Pinned
612
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...
expected
assert
variable
tests/worker/test_replayer.py
test_replayer_async_ordering
485
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...
desc.id
assert
complex_expr
tests/test_client.py
test_describe
367
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...
0
assert
numeric_literal
tests/contrib/openai_agents/test_openai_tracing.py
test_custom_span_without_trace_context
584
null
temporalio/sdk-python
import asyncio import concurrent.futures import logging import logging.handlers import os import queue import signal import threading import time import uuid from collections.abc import Callable, Sequence from concurrent.futures import ThreadPoolExecutor from concurrent.futures.process import BrokenProcessPool from con...
[]
assert
collection
tests/worker/test_activity.py
test_activity_info
212
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...
attrs
assert
variable
tests/test_common.py
test_typed_search_attributes_contains_with_falsy_value
105
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...
["module orig"]
assert
collection
tests/worker/workflow_sandbox/test_importer.py
test_workflow_sandbox_importer_passthrough_module
35
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....
RPCStatusCode.INTERNAL
assert
complex_expr
tests/worker/test_update_with_start.py
test_start_update_with_start_empty_details
841
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...
thread_local.copy()
assert
func_call
tests/worker/workflow_sandbox/test_importer.py
test_thread_local_sys_module_attrs
158
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...
detach_count
assert
variable
tests/contrib/opentelemetry/test_opentelemetry.py
test_opentelemetry_context_restored_after_activity
895
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...
3
assert
numeric_literal
tests/contrib/openai_agents/test_openai_tracing.py
test_external_trace_and_span_to_workflow_spans
429
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...
has_log)
assert_*
variable
tests/test_runtime.py
test_runtime_task_fail_log_forwarding
189
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...
mk_call)
assert_*
variable
tests/worker/test_worker.py
wait_until_worker_deployment_visible
1,121
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 @pytest.mark.parametrize( ["query_param_str", "expected_event_ref"], [ ( "eventType=NexusOperationScheduled&refe...
v
assert
variable
tests/nexus/test_link_conversion.py
test_query_params_to_event_reference
48
null
temporalio/sdk-python
import asyncio import concurrent.futures import logging import logging.handlers import os import queue import signal import threading import time import uuid from collections.abc import Callable, Sequence from concurrent.futures import ThreadPoolExecutor from concurrent.futures.process import BrokenProcessPool from con...
err.value)
assert_*
complex_expr
tests/worker/test_activity.py
test_activity_failure
318
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 ...
1
assert
numeric_literal
tests/contrib/pydantic/models.py
_check_instance
ParentModel
120
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...
["another val"]
assert
collection
tests/worker/workflow_sandbox/test_importer.py
test_workflow_sandbox_importer_passthrough_module
47
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_*
string_literal
tests/test_converter.py
test_converter_default
157
null
temporalio/sdk-python
from __future__ import annotations import pathlib from dataclasses import dataclass from typing import ClassVar import pytest from temporalio.worker.workflow_sandbox._restrictions import ( RestrictedWorkflowAccessError, RestrictionContext, SandboxMatcher, SandboxRestrictions, _RestrictedProxy, ) ...
"__format__"
assert
string_literal
tests/worker/workflow_sandbox/test_restrictions.py
test_restricted_proxy_dunder_methods
61
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...
orig
assert
variable
tests/contrib/pydantic/test_pydantic.py
test_pydantic_model_with_strict_field_inside_sandbox
299
null
temporalio/sdk-python
import asyncio import threading import time from contextvars import copy_context from unittest.mock import Mock import pytest from temporalio import activity from temporalio.client import Client from temporalio.exceptions import CancelledError from temporalio.testing import ActivityEnvironment async def test_activit...
type(actual_err)
assert
func_call
tests/testing/test_activity.py
test_activity_env_assert
127
null
temporalio/sdk-python
from __future__ import annotations import asyncio import dataclasses import json import uuid from collections import defaultdict from collections.abc import Sequence from dataclasses import dataclass, field from datetime import timedelta from typing import Any, Literal import nexusrpc import pytest from pydantic impo...
result.trace
assert
complex_expr
tests/test_serialization_context.py
test_pydantic_converter_with_context
1,835
null
temporalio/sdk-python
from __future__ import annotations import asyncio import concurrent.futures import uuid from collections import Counter from collections.abc import Sequence from dataclasses import dataclass from datetime import timedelta from logging import getLogger from typing import Any import nexusrpc import nexusrpc.handler imp...
1
assert
numeric_literal
tests/nexus/test_workflow_caller_errors.py
test_rpc_error_fails_without_retry
642
null
temporalio/sdk-python
import asyncio import concurrent.futures import logging import logging.handlers import os import queue import signal import threading import time import uuid from collections.abc import Callable, Sequence from concurrent.futures import ThreadPoolExecutor from concurrent.futures.process import BrokenProcessPool from con...
client
assert
variable
tests/worker/test_activity.py
test_client_available_in_async_activities
140
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(inside2)
assert
func_call
tests/worker/workflow_sandbox/test_importer.py
test_workflow_sandbox_importer_passthrough_all_modules
81
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...
client)
assert_*
variable
tests/contrib/openai_agents/test_openai.py
test_exception_handling
1,462
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...
from_now
assert
variable
tests/testing/test_workflow.py
assert_timestamp_from_now
336
null
temporalio/sdk-python
import os import textwrap from pathlib import Path import pytest from temporalio.client import Client from temporalio.envconfig import ClientConfig, ClientConfigProfile, ClientConfigTLS from temporalio.service import TLSConfig TOML_CONFIG_BASE = textwrap.dedent( """ [profile.default] address = "default-a...
2
assert
numeric_literal
tests/test_envconfig.py
test_load_profiles_from_file_all
245
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...
orig_objects
assert
variable
tests/contrib/pydantic/test_pydantic.py
test_round_trip_pydantic_objects
98
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...
result[2:]
assert
complex_expr
tests/worker/workflow_sandbox/test_runner.py
test_workflow_sandbox_bad_asyncio
463
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, ...
str(err)
assert
func_call
tests/test_service.py
test_method
252
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...
None
assert
none_literal
tests/helpers/__init__.py
assert_workflow_exists_eventually
228
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...
["module orig"]
assert
collection
tests/worker/workflow_sandbox/test_runner.py
test_workflow_sandbox_global_state
148
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_dynamic_handler_warnings(): with pytest.deprecated_ca...
2
assert
numeric_literal
tests/test_workflow.py
test_workflow_defn_dynamic_handler_warnings
399
null
temporalio/sdk-python
import asyncio import concurrent.futures import threading import uuid from dataclasses import dataclass from datetime import timedelta from typing import Literal import nexusrpc import pytest from nexusrpc.handler import ( StartOperationContext, service_handler, sync_operation, ) from temporalio import ne...
True
assert
bool_literal
tests/nexus/test_nexus_worker_shutdown.py
test_is_worker_shutdown
345
null
temporalio/sdk-python
import collections import decimal import fractions import re from collections.abc import Hashable, Sequence from enum import Enum, IntEnum from re import Pattern from typing import ( Any, NamedTuple, cast, ) from pydantic import BaseModel from typing_extensions import TypedDict def make_typed_dict_object(...
True
assert
bool_literal
tests/contrib/pydantic/models_2.py
_check_instance
StandardTypesModel
92
null
temporalio/sdk-python
import dataclasses from datetime import datetime, timedelta from uuid import UUID from pydantic import BaseModel, create_model from temporalio import workflow from tests.contrib.pydantic.models import ( ComplexCustomType, ComplexCustomUnionType, PydanticModels, PydanticModelWithStrictField, make_...
obj
assert
variable
tests/contrib/pydantic/workflows.py
_test_pydantic_model_with_strict_field
153
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...
2
assert
numeric_literal
tests/test_client.py
test_schedule_basics
1,015
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, 2]
assert
collection
tests/test_client.py
test_schedule_backfill
1,142
null
temporalio/sdk-python
import asyncio import concurrent.futures import logging import logging.handlers import os import queue import signal import threading import time import uuid from collections.abc import Callable, Sequence from concurrent.futures import ThreadPoolExecutor from concurrent.futures.process import BrokenProcessPool from con...
err)
assert_*
variable
tests/worker/test_activity.py
assert_activity_application_error
1,643
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...
2
assert
numeric_literal
tests/contrib/openai_agents/test_openai_tracing.py
test_external_trace_to_workflow_spans
341
null
temporalio/sdk-python
from __future__ import annotations import asyncio import concurrent.futures import uuid from collections import Counter from collections.abc import Sequence from dataclasses import dataclass from datetime import timedelta from logging import getLogger from typing import Any import nexusrpc import nexusrpc.handler imp...
TimeoutType.START_TO_CLOSE
assert
complex_expr
tests/nexus/test_workflow_caller_errors.py
test_error_raised_by_start_to_close_timeout_of_nexus_operation
501
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...
None
assert
none_literal
tests/test_converter.py
test_nexus_handler_error_with_cause
736
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...
result[:2]
assert
complex_expr
tests/worker/workflow_sandbox/test_runner.py
test_workflow_sandbox_bad_asyncio
461
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...
3
assert
numeric_literal
tests/contrib/openai_agents/test_openai.py
test_nexus_tool_workflow
515
null
temporalio/sdk-python
from __future__ import annotations import asyncio import uuid from dataclasses import dataclass import pytest from nexusrpc.handler import service_handler from temporalio import nexus, workflow from temporalio.client import Client from temporalio.common import WorkflowIDConflictPolicy from temporalio.testing import ...
["test-result"] * 5
assert
collection
tests/nexus/test_use_existing_conflict_policy.py
test_multiple_operation_invocations_can_connect_to_same_handler_workflow
125
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...
[7]
assert
collection
tests/contrib/pydantic/test_pydantic.py
test_no_type_annotations
318
null
temporalio/sdk-python
import os import textwrap from pathlib import Path import pytest from temporalio.client import Client from temporalio.envconfig import ClientConfig, ClientConfigProfile, ClientConfigTLS from temporalio.service import TLSConfig TOML_CONFIG_BASE = textwrap.dedent( """ [profile.default] address = "default-a...
None
assert
none_literal
tests/test_envconfig.py
test_load_profile_from_file_default
74
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...
ss.releases
assert
complex_expr
tests/worker/test_worker.py
test_custom_slot_supplier
485
null
temporalio/sdk-python
import asyncio import concurrent.futures import logging import logging.handlers import os import queue import signal import threading import time import uuid from collections.abc import Callable, Sequence from concurrent.futures import ThreadPoolExecutor from concurrent.futures.process import BrokenProcessPool from con...
TypeError)
pytest.raises
variable
tests/worker/test_activity.py
test_activity_without_decorator
88
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...
4
assert
numeric_literal
tests/contrib/openai_agents/test_openai.py
test_agents_as_tools_workflow
760
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...
TimeoutType.START_TO_CLOSE
assert
complex_expr
tests/worker/test_payload_size_limits.py
test_payload_size_error_workflow_result
258
null
temporalio/sdk-python
from __future__ import annotations import abc import asyncio import copy import dataclasses import functools import inspect import json import re import uuid import warnings from abc import ABC, abstractmethod from asyncio import Future from collections.abc import ( AsyncIterator, Awaitable, Callable, ...
0
assert
numeric_literal
temporalio/client.py
fetch_next_page
WorkflowHistoryEventAsyncIterator
5,396
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...
1
assert
numeric_literal
tests/contrib/openai_agents/test_openai_tracing.py
test_otel_tracing_in_runner
672
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...
str(err)
assert
func_call
tests/worker/workflow_sandbox/test_runner.py
run
KnownIssuesWorkflow
418
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...
DefinedLater
assert
variable
tests/test_common.py
assert_hints
66
null
temporalio/sdk-python
import asyncio import threading import time from contextvars import copy_context from unittest.mock import Mock import pytest from temporalio import activity from temporalio.client import Client from temporalio.exceptions import CancelledError from temporalio.testing import ActivityEnvironment async def test_activit...
"bar")
assert_*
string_literal
tests/testing/test_activity.py
test_activity_env_assert
115
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.some_method)
assert_*
complex_expr
tests/test_common.py
test_type_hints_from_func
72
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...
[str]
assert
collection
tests/test_common.py
assert_hints
65
null
temporalio/sdk-python
import os import textwrap from pathlib import Path import pytest from temporalio.client import Client from temporalio.envconfig import ClientConfig, ClientConfigProfile, ClientConfigTLS from temporalio.service import TLSConfig TOML_CONFIG_BASE = textwrap.dedent( """ [profile.default] address = "default-a...
{}
assert
collection
tests/test_envconfig.py
test_client_config_profile_to_from_dict
567
null
temporalio/sdk-python
from __future__ import annotations import pathlib from dataclasses import dataclass from typing import ClassVar import pytest from temporalio.worker.workflow_sandbox._restrictions import ( RestrictedWorkflowAccessError, RestrictionContext, SandboxMatcher, SandboxRestrictions, _RestrictedProxy, ) ...
"__str__"
assert
string_literal
tests/worker/workflow_sandbox/test_restrictions.py
test_restricted_proxy_dunder_methods
59
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...
0
assert
numeric_literal
tests/test_client.py
test_schedule_basics
962
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...
TimeoutType.HEARTBEAT
assert
complex_expr
tests/testing/test_workflow.py
test_workflow_env_time_skipping_heartbeat_timeout
142
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, ...
1
assert
numeric_literal
tests/test_activity.py
test_start_activity_calls_interceptor
232
null
temporalio/sdk-python
import asyncio import threading import time from contextvars import copy_context from unittest.mock import Mock import pytest from temporalio import activity from temporalio.client import Client from temporalio.exceptions import CancelledError from temporalio.testing import ActivityEnvironment async def test_activit...
str(actual_err)
assert
func_call
tests/testing/test_activity.py
test_activity_env_assert
128
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...
message
assert
variable
tests/test_converter.py
test_nexus_handler_error_round_trip
641
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, ...
None
assert
none_literal
tests/test_service.py
test_connect_config_tls_enabled_by_default_when_api_key_provided
182
null