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
agronholm/apscheduler
from __future__ import annotations from datetime import datetime, timedelta, timezone import pytest from apscheduler import MaxIterationsReached from apscheduler.triggers.calendarinterval import CalendarIntervalTrigger from apscheduler.triggers.combining import AndTrigger, OrTrigger from apscheduler.triggers.cron im...
start_time + timedelta(seconds=8)
assert
func_call
tests/triggers/test_combining.py
test_two_interval_triggers
TestOrTrigger
195
null
gouline/dbt-metabase
from collections.abc import MutableSequence from typing import cast from unittest.mock import Mock from dbtmetabase._models import _Context from dbtmetabase.manifest import Column, Group, Model from tests._mocks import MockDbtMetabase def test_multi_database_foreign_key_resolution(): """Test foreign key resolutio...
2
assert
numeric_literal
tests/test_models.py
test_multi_database_foreign_key_resolution
252
null
gouline/dbt-metabase
from collections.abc import MutableSequence from typing import cast from unittest.mock import Mock from dbtmetabase._models import _Context from dbtmetabase.manifest import Column, Group, Model from tests._mocks import MockDbtMetabase def test_build_lookups(core: MockDbtMetabase): expected = { "PUBLIC.CUS...
set(expected.keys())
assert
func_call
tests/test_models.py
test_build_lookups
88
null
gouline/dbt-metabase
from collections.abc import MutableSequence from typing import cast from unittest.mock import Mock from dbtmetabase._models import _Context from dbtmetabase.manifest import Column, Group, Model from tests._mocks import MockDbtMetabase def test_export_hidden_table(core: MockDbtMetabase): core._manifest.read_models...
None
assert
none_literal
tests/test_models.py
test_export_hidden_table
22
null
gouline/dbt-metabase
from tests._mocks import MockMetabase def test_metabase_find_database(metabase: MockMetabase): db = metabase.find_database(name="dbtmetabase") assert db assert db["id"] ==
2
assert
numeric_literal
tests/test_metabase.py
test_metabase_find_database
7
null
gouline/dbt-metabase
from operator import itemgetter from pathlib import Path from typing import cast import pytest import yaml from dbtmetabase._exposures import _Context, _Exposure from tests._mocks import FIXTURES_PATH, TMP_PATH, MockDbtMetabase, MockMetabase def _assert_exposures(expected_path: Path, actual_path: Path): with ope...
sorted(expected["exposures"], key=itemgetter("name"))
assert
func_call
tests/test_exposures.py
_assert_exposures
18
null
gouline/dbt-metabase
from collections.abc import MutableSequence from typing import cast from unittest.mock import Mock from dbtmetabase._models import _Context from dbtmetabase.manifest import Column, Group, Model from tests._mocks import MockDbtMetabase def test_multi_database_get_tables(core: MockDbtMetabase): """Test _get_metabas...
"BRONZE"
assert
string_literal
tests/test_models.py
test_multi_database_get_tables
166
null
gouline/dbt-metabase
from operator import itemgetter from pathlib import Path from typing import cast import pytest import yaml from dbtmetabase._exposures import _Context, _Exposure from tests._mocks import FIXTURES_PATH, TMP_PATH, MockDbtMetabase, MockMetabase def _assert_exposures(expected_path: Path, actual_path: Path): with ope...
exposure.depends
assert
complex_expr
tests/test_exposures.py
test_extract_exposures_native_depends
134
null
gouline/dbt-metabase
from collections.abc import MutableSequence from typing import cast from unittest.mock import Mock from dbtmetabase._models import _Context from dbtmetabase.manifest import Column, Group, Model from tests._mocks import MockDbtMetabase def test_build_lookups(core: MockDbtMetabase): expected = { "PUBLIC.CUS...
columns
assert
variable
tests/test_models.py
test_build_lookups
91
null
gouline/dbt-metabase
from collections.abc import Sequence from operator import attrgetter from dbtmetabase.manifest import Column, Group, Manifest, Model from tests._mocks import FIXTURES_PATH, MockManifest def _assert_models_equal( first: Sequence[Model], second: Sequence[Model], ): assert len(first) == len(second), "mismatc...
second_model
assert
variable
tests/test_manifest.py
_assert_models_equal
426
null
gouline/dbt-metabase
from collections.abc import MutableSequence from typing import cast from unittest.mock import Mock from dbtmetabase._models import _Context from dbtmetabase.manifest import Column, Group, Model from tests._mocks import MockDbtMetabase def test_multi_database_get_tables(core: MockDbtMetabase): """Test _get_metabas...
"my_model"
assert
string_literal
tests/test_models.py
test_multi_database_get_tables
165
null
gouline/dbt-metabase
from operator import itemgetter from pathlib import Path from typing import cast import pytest import yaml from dbtmetabase._exposures import _Context, _Exposure from tests._mocks import FIXTURES_PATH, TMP_PATH, MockDbtMetabase, MockMetabase def _assert_exposures(expected_path: Path, actual_path: Path): with ope...
exposure.native_query
assert
complex_expr
tests/test_exposures.py
test_extract_exposures_native_depends
135
null
gouline/dbt-metabase
from tests._mocks import MockMetabase def test_metabase_get_collection_items(metabase: MockMetabase): cards = metabase.get_collection_items( uid="root", models=("card",), ) assert {item["model"] for item in cards} == {"card"} dashboards = metabase.get_collection_items( uid="roo...
{"card", "dashboard"}
assert
collection
tests/test_metabase.py
test_metabase_get_collection_items
36
null
gouline/dbt-metabase
from dbtmetabase.format import Filter, NullValue, dump_yaml, safe_description, safe_name from tests._mocks import FIXTURES_PATH, TMP_PATH def test_dump_yaml(): fixture_path = FIXTURES_PATH / "test_dump_yaml.yml" output_path = TMP_PATH / "test_dump_yaml.yml" with open(output_path, "w", encoding="utf-8") as ...
expected
assert
variable
tests/test_format.py
test_dump_yaml
73
null
gouline/dbt-metabase
from tests._mocks import MockMetabase def test_metabase_get_collection_items(metabase: MockMetabase): cards = metabase.get_collection_items( uid="root", models=("card",), ) assert {item["model"] for item in cards} == {"card"} dashboards = metabase.get_collection_items( uid="roo...
{"dashboard"}
assert
collection
tests/test_metabase.py
test_metabase_get_collection_items
30
null
gouline/dbt-metabase
from tests._mocks import MockMetabase def test_metabase_get_collection_items(metabase: MockMetabase): cards = metabase.get_collection_items( uid="root", models=("card",), ) assert {item["model"] for item in cards} ==
{"card"}
assert
collection
tests/test_metabase.py
test_metabase_get_collection_items
24
null
gouline/dbt-metabase
from collections.abc import MutableSequence from typing import cast from unittest.mock import Mock from dbtmetabase._models import _Context from dbtmetabase.manifest import Column, Group, Model from tests._mocks import MockDbtMetabase def test_multi_database_model_matching(): """Test that dbt models match correct...
f"{schema_name}.{model_name}"
assert
string_literal
tests/test_models.py
test_multi_database_model_matching
234
null
gouline/dbt-metabase
from collections.abc import MutableSequence from typing import cast from unittest.mock import Mock from dbtmetabase._models import _Context from dbtmetabase.manifest import Column, Group, Model from tests._mocks import MockDbtMetabase def test_multi_database_model_matching(): """Test that dbt models match correct...
f"{database_name}.{schema_name}.{model_name}"
assert
string_literal
tests/test_models.py
test_multi_database_model_matching
231
null
gouline/dbt-metabase
from collections.abc import MutableSequence from typing import cast from unittest.mock import Mock from dbtmetabase._models import _Context from dbtmetabase.manifest import Column, Group, Model from tests._mocks import MockDbtMetabase def test_multi_database_foreign_key_resolution(): """Test foreign key resolutio...
1
assert
numeric_literal
tests/test_models.py
test_multi_database_foreign_key_resolution
249
null
gouline/dbt-metabase
from tests._mocks import MockMetabase def test_metabase_find_database(metabase: MockMetabase): db = metabase.find_database(name="dbtmetabase") assert db assert db["id"] == 2 assert metabase.find_database(name="foo") is
None
assert
none_literal
tests/test_metabase.py
test_metabase_find_database
8
null
gouline/dbt-metabase
from dbtmetabase.format import Filter, NullValue, dump_yaml, safe_description, safe_name from tests._mocks import FIXTURES_PATH, TMP_PATH def test_safe_description(): assert
"Depends on\n\nQuestion ( #2 )!"
assert
string_literal
tests/test_format.py
test_safe_description
38
null
gouline/dbt-metabase
from collections.abc import Sequence from operator import attrgetter from dbtmetabase.manifest import Column, Group, Manifest, Model from tests._mocks import FIXTURES_PATH, MockManifest def _assert_models_equal( first: Sequence[Model], second: Sequence[Model], ): assert len(first) ==
len(second)
assert
func_call
tests/test_manifest.py
_assert_models_equal
407
null
gouline/dbt-metabase
from collections.abc import Sequence from operator import attrgetter from dbtmetabase.manifest import Column, Group, Manifest, Model from tests._mocks import FIXTURES_PATH, MockManifest def _assert_models_equal( first: Sequence[Model], second: Sequence[Model], ): assert len(first) == len(second), "mismatc...
second_model.name
assert
complex_expr
tests/test_manifest.py
_assert_models_equal
414
null
gouline/dbt-metabase
from collections.abc import Sequence from operator import attrgetter from dbtmetabase.manifest import Column, Group, Manifest, Model from tests._mocks import FIXTURES_PATH, MockManifest def _assert_models_equal( first: Sequence[Model], second: Sequence[Model], ): assert len(first) == len(second), "mismatc...
second_column
assert
variable
tests/test_manifest.py
_assert_models_equal
423
null
gouline/dbt-metabase
from dbtmetabase.format import Filter, NullValue, dump_yaml, safe_description, safe_name from tests._mocks import FIXTURES_PATH, TMP_PATH def test_safe_name(): assert safe_name("Somebody's 2 collections!") ==
"somebody_s_2_collections_"
assert
string_literal
tests/test_format.py
test_safe_name
32
null
gouline/dbt-metabase
from collections.abc import Sequence from operator import attrgetter from dbtmetabase.manifest import Column, Group, Manifest, Model from tests._mocks import FIXTURES_PATH, MockManifest def test_v11_disabled(): manifest = MockManifest(FIXTURES_PATH / "manifest-v11-disabled.json") manifest.read_models() o...
None
assert
none_literal
tests/test_manifest.py
test_v11_disabled
13
null
gouline/dbt-metabase
from tests._mocks import MockMetabase def test_metabase_get_collections(metabase: MockMetabase): excluded = metabase.get_collections(exclude_personal=True) assert len(excluded) == 2 included = metabase.get_collections(exclude_personal=False) assert len(included) ==
3
assert
numeric_literal
tests/test_metabase.py
test_metabase_get_collections
16
null
SWE-agent/SWE-ReX
import pytest from swerex.deployment.config import DockerDeploymentConfig from swerex.deployment.docker import DockerDeployment from swerex.utils.free_port import find_free_port @pytest.mark.slow def test_docker_deployment_config_platform(): config = DockerDeploymentConfig(docker_args=["--platform", "linux/amd64"...
"linux/amd64"
assert
string_literal
tests/test_docker_deployment.py
test_docker_deployment_config_platform
34
null
SWE-agent/SWE-ReX
import pytest from swerex.exceptions import BashIncorrectSyntaxError from swerex.runtime.local import _check_bash_command, _split_bash_command def test_split_bash_command_all_blank_lines(): assert _split_bash_command("\n\n\n") ==
[]
assert
collection
tests/test_runtime.py
test_split_bash_command_all_blank_lines
46
null
SWE-agent/SWE-ReX
import pytest from swerex.exceptions import BashIncorrectSyntaxError from swerex.runtime.local import _check_bash_command, _split_bash_command def test_split_bash_command_multiple_commands(): assert _split_bash_command("cmd1\ncmd2\ncmd3") ==
["cmd1", "cmd2", "cmd3"]
assert
collection
tests/test_runtime.py
test_split_bash_command_multiple_commands
24
null
SWE-agent/SWE-ReX
import pytest from swerex.exceptions import BashIncorrectSyntaxError from swerex.runtime.local import _check_bash_command, _split_bash_command def test_split_bash_command_normal(): assert _split_bash_command("cmd1\ncmd2") ==
["cmd1", "cmd2"]
assert
collection
tests/test_runtime.py
test_split_bash_command_normal
8
null
SWE-agent/SWE-ReX
import asyncio from pathlib import Path import pytest from swerex.exceptions import ( BashIncorrectSyntaxError, CommandTimeoutError, NonZeroExitCodeError, SessionDoesNotExistError, ) from swerex.runtime.abstract import ( BashInterruptAction, CloseBashSessionRequest, CreateBashSessionReques...
""
assert
string_literal
tests/test_execution.py
test_execute_merge_output_streams_true
230
null
SWE-agent/SWE-ReX
import asyncio from pathlib import Path import pytest from swerex.exceptions import ( BashIncorrectSyntaxError, CommandTimeoutError, NonZeroExitCodeError, SessionDoesNotExistError, ) from swerex.runtime.abstract import ( BashInterruptAction, CloseBashSessionRequest, CreateBashSessionReques...
127
assert
numeric_literal
tests/test_execution.py
test_run_in_shell
112
null
SWE-agent/SWE-ReX
import pytest from swerex.exceptions import BashIncorrectSyntaxError from swerex.runtime.local import _check_bash_command, _split_bash_command def test_split_bash_command_escaped_newline(): assert _split_bash_command("cmd1\\\n asdf") ==
["cmd1\\\n asdf"]
assert
collection
tests/test_runtime.py
test_split_bash_command_escaped_newline
12
null
SWE-agent/SWE-ReX
import asyncio from pathlib import Path import pytest from swerex.exceptions import ( BashIncorrectSyntaxError, CommandTimeoutError, NonZeroExitCodeError, SessionDoesNotExistError, ) from swerex.runtime.abstract import ( BashInterruptAction, CloseBashSessionRequest, CreateBashSessionReques...
"err"
assert
string_literal
tests/test_execution.py
test_execute_merge_output_streams_false
239
null
SWE-agent/SWE-ReX
import pytest from swerex.deployment.config import DockerDeploymentConfig from swerex.deployment.docker import DockerDeployment from swerex.utils.free_port import find_free_port def test_docker_deployment_config_container_runtime(): # Test default container runtime is docker config = DockerDeploymentConfig(im...
"docker"
assert
string_literal
tests/test_docker_deployment.py
test_docker_deployment_config_container_runtime
51
null
SWE-agent/SWE-ReX
import pytest from swerex.exceptions import BashIncorrectSyntaxError from swerex.runtime.local import _check_bash_command, _split_bash_command def test_check_bash_command_invalid(): with pytest.raises(
BashIncorrectSyntaxError)
pytest.raises
variable
tests/test_runtime.py
test_check_bash_command_invalid
68
null
SWE-agent/SWE-ReX
import asyncio from pathlib import Path import pytest from swerex.exceptions import ( BashIncorrectSyntaxError, CommandTimeoutError, NonZeroExitCodeError, SessionDoesNotExistError, ) from swerex.runtime.abstract import ( BashInterruptAction, CloseBashSessionRequest, CreateBashSessionReques...
"\nx"
assert
string_literal
tests/test_execution.py
test_execute_command_with_newline_in_session
76
null
SWE-agent/SWE-ReX
import pytest from swerex.exceptions import BashIncorrectSyntaxError from swerex.runtime.local import _check_bash_command, _split_bash_command def test_split_command_with_heredoc_quotations(): assert _split_bash_command('cmd1 <<EOF\n"a\nb"\nEOF') ==
[ 'cmd1 <<EOF\n"a\nb"\nEOF', ]
assert
collection
tests/test_runtime.py
test_split_command_with_heredoc_quotations
59
null
SWE-agent/SWE-ReX
import pytest from swerex.deployment.config import DockerDeploymentConfig from swerex.deployment.docker import DockerDeployment from swerex.utils.free_port import find_free_port @pytest.mark.slow def test_docker_deployment_config_platform(): config = DockerDeploymentConfig(docker_args=["--platform", "linux/amd64"...
ValueError)
pytest.raises
variable
tests/test_docker_deployment.py
test_docker_deployment_config_platform
42
null
SWE-agent/SWE-ReX
import pytest from swerex.deployment.config import DockerDeploymentConfig from swerex.deployment.docker import DockerDeployment from swerex.utils.free_port import find_free_port def test_podman_deployment_config(): """Test that DockerDeployment works with podman configuration""" config = DockerDeploymentConfi...
8080
assert
numeric_literal
tests/test_docker_deployment.py
test_podman_deployment_config
74
null
SWE-agent/SWE-ReX
import pytest from swerex.deployment.config import DockerDeploymentConfig from swerex.deployment.docker import DockerDeployment from swerex.utils.free_port import find_free_port @pytest.mark.slow def test_docker_deployment_config_platform(): config = DockerDeploymentConfig(docker_args=["--platform", "linux/amd64"...
None
assert
none_literal
tests/test_docker_deployment.py
test_docker_deployment_config_platform
40
null
SWE-agent/SWE-ReX
import asyncio from pathlib import Path import pytest from swerex.exceptions import ( BashIncorrectSyntaxError, CommandTimeoutError, NonZeroExitCodeError, SessionDoesNotExistError, ) from swerex.runtime.abstract import ( BashInterruptAction, CloseBashSessionRequest, CreateBashSessionReques...
"24\n"
assert
string_literal
tests/test_execution.py
test_multiple_isolated_shells
209
null
SWE-agent/SWE-ReX
from pathlib import Path import pytest from swerex.runtime.abstract import ReadFileRequest, UploadRequest from swerex.runtime.local import LocalRuntime def local_runtime(): return LocalRuntime() async def test_upload_directory(local_runtime: LocalRuntime, tmp_path: Path): dir_path = tmp_path / "source_dir" ...
"test2"
assert
string_literal
tests/test_local_runtime.py
test_upload_directory
30
null
SWE-agent/SWE-ReX
import pytest from swerex.exceptions import BashIncorrectSyntaxError from swerex.runtime.local import _check_bash_command, _split_bash_command def test_split_bash_command_quotation_marks(): assert _split_bash_command('cmd1 "a\nb"') == [ 'cmd1 "a\nb"', ] assert _split_bash_command("cmd1 'a\nb'") =...
[ "cmd1 'a\nb'", ]
assert
collection
tests/test_runtime.py
test_split_bash_command_quotation_marks
53
null
SWE-agent/SWE-ReX
from pathlib import Path import pytest from swerex.runtime.abstract import ReadFileRequest, UploadRequest from swerex.runtime.local import LocalRuntime def local_runtime(): return LocalRuntime() async def test_upload_directory(local_runtime: LocalRuntime, tmp_path: Path): dir_path = tmp_path / "source_dir" ...
"test1"
assert
string_literal
tests/test_local_runtime.py
test_upload_directory
29
null
SWE-agent/SWE-ReX
import asyncio from pathlib import Path import pytest from swerex.exceptions import ( BashIncorrectSyntaxError, CommandTimeoutError, NonZeroExitCodeError, SessionDoesNotExistError, ) from swerex.runtime.abstract import ( BashInterruptAction, CloseBashSessionRequest, CreateBashSessionReques...
"test"
assert
string_literal
tests/test_execution.py
test_read_write_file
38
null
SWE-agent/SWE-ReX
import asyncio from pathlib import Path import pytest from swerex.exceptions import ( BashIncorrectSyntaxError, CommandTimeoutError, NonZeroExitCodeError, SessionDoesNotExistError, ) from swerex.runtime.abstract import ( BashInterruptAction, CloseBashSessionRequest, CreateBashSessionReques...
0
assert
numeric_literal
tests/test_execution.py
test_run_shell_check_exit_code
306
null
SWE-agent/SWE-ReX
import pytest from swerex.deployment.config import DockerDeploymentConfig from swerex.deployment.docker import DockerDeployment from swerex.utils.free_port import find_free_port def test_podman_deployment_config(): """Test that DockerDeployment works with podman configuration""" config = DockerDeploymentConfi...
"test:latest"
assert
string_literal
tests/test_docker_deployment.py
test_podman_deployment_config
73
null
SWE-agent/SWE-ReX
import asyncio from pathlib import Path import pytest from swerex.exceptions import ( BashIncorrectSyntaxError, CommandTimeoutError, NonZeroExitCodeError, SessionDoesNotExistError, ) from swerex.runtime.abstract import ( BashInterruptAction, CloseBashSessionRequest, CreateBashSessionReques...
1
assert
numeric_literal
tests/test_execution.py
test_run_in_shell
114
null
SWE-agent/SWE-ReX
import requests from tests.conftest import RemoteServer headers = {"X-API-Key": "your_secret_api_key_here"} def test_hello_world(remote_server: RemoteServer): assert
"hello world"
assert
string_literal
tests/test_server.py
test_hello_world
15
null
SWE-agent/SWE-ReX
import pytest from swerex.deployment.config import DockerDeploymentConfig from swerex.deployment.docker import DockerDeployment from swerex.utils.free_port import find_free_port async def test_docker_deployment(): port = find_free_port() print(f"Using port {port} for the docker deployment") d = DockerDepl...
RuntimeError)
pytest.raises
variable
tests/test_docker_deployment.py
test_docker_deployment
12
null
SWE-agent/SWE-ReX
import requests from tests.conftest import RemoteServer headers = {"X-API-Key": "your_secret_api_key_here"} def test_unauthenticated_request(remote_server: RemoteServer): for endpoint in [ "/is_alive", "/", "/create_session", "/run_in_session", "/close_session", "/...
403
assert
numeric_literal
tests/test_server.py
test_unauthenticated_request
35
null
SWE-agent/SWE-ReX
import pytest from swerex.exceptions import BashIncorrectSyntaxError from swerex.runtime.local import _check_bash_command, _split_bash_command def test_split_bash_command_multilline_blank_line_heredoc(): assert _split_bash_command("cmd1<<EOF\na\nb\n\n\nEOF\ncmd2<<EOF\nd\ne\nEOF") ==
[ "cmd1<<EOF\na\nb\n\n\nEOF", "cmd2<<EOF\nd\ne\nEOF", ]
assert
collection
tests/test_runtime.py
test_split_bash_command_multilline_blank_line_heredoc
39
null
SWE-agent/SWE-ReX
import pytest from swerex.exceptions import BashIncorrectSyntaxError from swerex.runtime.local import _check_bash_command, _split_bash_command def test_split_bash_command_heredoc(): assert _split_bash_command("cmd1<<EOF\na\nb\nEOF") == ["cmd1<<EOF\na\nb\nEOF"] assert _split_bash_command("cmd1<<EOF\na\nb\nEOF...
[ "cmd1<<EOF\na\nb\nEOF", "cmd2<<EOF\nd\ne\nEOF", ]
assert
collection
tests/test_runtime.py
test_split_bash_command_heredoc
17
null
SWE-agent/SWE-ReX
import pytest from swerex.exceptions import BashIncorrectSyntaxError from swerex.runtime.local import _check_bash_command, _split_bash_command def test_split_command_with_heredoc_quotations(): assert _split_bash_command('cmd1 <<EOF\n"a\nb"\nEOF') == [ 'cmd1 <<EOF\n"a\nb"\nEOF', ] assert _split_ba...
[ "cmd1 <<EOF\n'a\nb'\nEOF", ]
assert
collection
tests/test_runtime.py
test_split_command_with_heredoc_quotations
62
null
SWE-agent/SWE-ReX
import asyncio from pathlib import Path import pytest from swerex.exceptions import ( BashIncorrectSyntaxError, CommandTimeoutError, NonZeroExitCodeError, SessionDoesNotExistError, ) from swerex.runtime.abstract import ( BashInterruptAction, CloseBashSessionRequest, CreateBashSessionReques...
"out"
assert
string_literal
tests/test_execution.py
test_execute_merge_output_streams_false
238
null
SWE-agent/SWE-ReX
import pytest from swerex.exceptions import BashIncorrectSyntaxError from swerex.runtime.local import _check_bash_command, _split_bash_command def test_split_bash_command_quotation_marks(): assert _split_bash_command('cmd1 "a\nb"') ==
[ 'cmd1 "a\nb"', ]
assert
collection
tests/test_runtime.py
test_split_bash_command_quotation_marks
50
null
SWE-agent/SWE-ReX
import pytest from swerex.exceptions import BashIncorrectSyntaxError from swerex.runtime.local import _check_bash_command, _split_bash_command def test_split_bash_command_heredoc(): assert _split_bash_command("cmd1<<EOF\na\nb\nEOF") ==
["cmd1<<EOF\na\nb\nEOF"]
assert
collection
tests/test_runtime.py
test_split_bash_command_heredoc
16
null
safety-research/bloom
from bloom.stages.interactive_chat import ( append_event, build_transcript_header, timestamp, ) class TestBuildTranscriptHeader: def test_creates_header_with_required_fields(self): """Should create header with all required fields.""" header = build_transcript_header( evalua...
"You are helpful."
assert
string_literal
tests/test_interactive_chat.py
test_creates_header_with_required_fields
TestBuildTranscriptHeader
23
null
safety-research/bloom
from bloom.stages.interactive_chat import ( append_event, build_transcript_header, timestamp, ) class TestAppendEvent: def test_appends_multiple_events(self): """Should append multiple events in order.""" transcript = {"events": []} append_event(transcript, turn=1, event="user...
2
assert
numeric_literal
tests/test_interactive_chat.py
test_appends_multiple_events
TestAppendEvent
53
null
safety-research/bloom
from bloom.stages.interactive_chat import ( append_event, build_transcript_header, timestamp, ) class TestTimestamp: def test_returns_valid_date_components(self): """Should contain valid date components.""" ts = timestamp() year = int(ts[0:4]) month = int(ts[4:6]) ...
minute
assert
variable
tests/test_interactive_chat.py
test_returns_valid_date_components
TestTimestamp
83
null
safety-research/bloom
import json import tempfile from pathlib import Path from bloom.transcript_utils import ( add_transcript_event, format_transcript_for_judge, generate_id, get_transcript_format, init_transcript_metadata, load_transcript, ) class TestAddTranscriptEvent: def test_adds_event_with_reasoning(se...
2
assert
numeric_literal
tests/test_transcript_utils.py
test_adds_event_with_reasoning
TestAddTranscriptEvent
61
null
safety-research/bloom
from bloom.stages.interactive_chat import ( append_event, build_transcript_header, timestamp, ) class TestAppendEvent: def test_appends_event_to_transcript(self): """Should append event with turn, event type, and content.""" transcript = {"events": []} append_event(transcript,...
"Hello"
assert
string_literal
tests/test_interactive_chat.py
test_appends_event_to_transcript
TestAppendEvent
40
null
safety-research/bloom
from bloom.stages.interactive_chat import ( append_event, build_transcript_header, timestamp, ) class TestTimestamp: def test_returns_valid_date_components(self): """Should contain valid date components.""" ts = timestamp() year = int(ts[0:4]) month = int(ts[4:6]) ...
month
assert
variable
tests/test_interactive_chat.py
test_returns_valid_date_components
TestTimestamp
80
null
safety-research/bloom
import json import tempfile from pathlib import Path from bloom.transcript_utils import ( add_transcript_event, format_transcript_for_judge, generate_id, get_transcript_format, init_transcript_metadata, load_transcript, ) class TestGenerateId: def test_generates_uuid_string(self): ...
36
assert
numeric_literal
tests/test_transcript_utils.py
test_generates_uuid_string
TestGenerateId
24
null
safety-research/bloom
import json import tempfile from pathlib import Path from bloom.transcript_utils import ( add_transcript_event, format_transcript_for_judge, generate_id, get_transcript_format, init_transcript_metadata, load_transcript, ) class TestAddTranscriptEvent: def test_adds_event_with_reasoning(se...
"text"
assert
string_literal
tests/test_transcript_utils.py
test_adds_event_with_reasoning
TestAddTranscriptEvent
64
null
safety-research/bloom
from bloom.stages.interactive_chat import ( append_event, build_transcript_header, timestamp, ) class TestTimestamp: def test_returns_iso_format_string(self): """Should return timestamp in ISO format.""" ts = timestamp() # Format: YYYYMMDDTHHMMSSZ assert len(ts) ==
16
assert
numeric_literal
tests/test_interactive_chat.py
test_returns_iso_format_string
TestTimestamp
64
null
safety-research/bloom
from bloom.stages.interactive_chat import ( append_event, build_transcript_header, timestamp, ) class TestAppendEvent: def test_appends_multiple_events(self): """Should append multiple events in order.""" transcript = {"events": []} append_event(transcript, turn=1, event="user...
3
assert
numeric_literal
tests/test_interactive_chat.py
test_appends_multiple_events
TestAppendEvent
50
null
safety-research/bloom
from bloom.stages.interactive_chat import ( append_event, build_transcript_header, timestamp, ) class TestAppendEvent: def test_appends_event_to_transcript(self): """Should append event with turn, event type, and content.""" transcript = {"events": []} append_event(transcript,...
1
assert
numeric_literal
tests/test_interactive_chat.py
test_appends_event_to_transcript
TestAppendEvent
36
null
safety-research/bloom
from bloom.stages.interactive_chat import ( append_event, build_transcript_header, timestamp, ) class TestTimestamp: def test_returns_iso_format_string(self): """Should return timestamp in ISO format.""" ts = timestamp() # Format: YYYYMMDDTHHMMSSZ assert len(ts) == 16 ...
"T"
assert
string_literal
tests/test_interactive_chat.py
test_returns_iso_format_string
TestTimestamp
65
null
safety-research/bloom
import json import tempfile from pathlib import Path from bloom.transcript_utils import ( add_transcript_event, format_transcript_for_judge, generate_id, get_transcript_format, init_transcript_metadata, load_transcript, ) class TestAddTranscriptEvent: def test_adds_basic_event(self): ...
1
assert
numeric_literal
tests/test_transcript_utils.py
test_adds_basic_event
TestAddTranscriptEvent
40
null
safety-research/bloom
from bloom.stages.interactive_chat import ( append_event, build_transcript_header, timestamp, ) class TestBuildTranscriptHeader: def test_creates_header_with_required_fields(self): """Should create header with all required fields.""" header = build_transcript_header( evalua...
"claude-sonnet-4"
assert
string_literal
tests/test_interactive_chat.py
test_creates_header_with_required_fields
TestBuildTranscriptHeader
22
null
safety-research/bloom
import json import tempfile from pathlib import Path from bloom.transcript_utils import ( add_transcript_event, format_transcript_for_judge, generate_id, get_transcript_format, init_transcript_metadata, load_transcript, ) class TestAddTranscriptEvent: def test_adds_basic_event(self): ...
"user"
assert
string_literal
tests/test_transcript_utils.py
test_adds_basic_event
TestAddTranscriptEvent
45
null
safety-research/bloom
import json import tempfile from pathlib import Path from bloom.transcript_utils import ( add_transcript_event, format_transcript_for_judge, generate_id, get_transcript_format, init_transcript_metadata, load_transcript, ) class TestLoadTranscript: def test_loads_new_format(self): ...
result
assert
variable
tests/test_transcript_utils.py
test_loads_new_format
TestLoadTranscript
144
null
safety-research/bloom
import json from unittest.mock import patch import pytest class TestFixtureLoading: def test_ideation_fixture_loads(self, spb_fixtures): """Verify ideation.json has expected fields.""" ideation = spb_fixtures["ideation"] assert "variations" in ideation # From seed: num_scenarios=3...
6
assert
numeric_literal
tests/test_pipeline.py
test_ideation_fixture_loads
TestFixtureLoading
41
null
safety-research/bloom
from bloom.stages.interactive_chat import ( append_event, build_transcript_header, timestamp, ) class TestTimestamp: def test_returns_valid_date_components(self): """Should contain valid date components.""" ts = timestamp() year = int(ts[0:4]) month = int(ts[4:6]) ...
hour
assert
variable
tests/test_interactive_chat.py
test_returns_valid_date_components
TestTimestamp
82
null
safety-research/bloom
from bloom.stages.interactive_chat import ( append_event, build_transcript_header, timestamp, ) class TestTimestamp: def test_returns_iso_format_string(self): """Should return timestamp in ISO format.""" ts = timestamp() # Format: YYYYMMDDTHHMMSSZ assert len(ts) == 16 ...
"Z"
assert
string_literal
tests/test_interactive_chat.py
test_returns_iso_format_string
TestTimestamp
66
null
safety-research/bloom
from bloom.stages.interactive_chat import ( append_event, build_transcript_header, timestamp, ) class TestTimestamp: def test_returns_valid_date_components(self): """Should contain valid date components.""" ts = timestamp() year = int(ts[0:4]) month = int(ts[4:6]) ...
year
assert
variable
tests/test_interactive_chat.py
test_returns_valid_date_components
TestTimestamp
79
null
safety-research/bloom
import json import tempfile from pathlib import Path from bloom.transcript_utils import ( add_transcript_event, format_transcript_for_judge, generate_id, get_transcript_format, init_transcript_metadata, load_transcript, ) class TestLoadTranscript: def test_loads_new_format(self): ...
"test"
assert
string_literal
tests/test_transcript_utils.py
test_loads_new_format
TestLoadTranscript
145
null
safety-research/bloom
from bloom.stages.interactive_chat import ( append_event, build_transcript_header, timestamp, ) class TestTimestamp: def test_returns_valid_date_components(self): """Should contain valid date components.""" ts = timestamp() year = int(ts[0:4]) month = int(ts[4:6]) ...
day
assert
variable
tests/test_interactive_chat.py
test_returns_valid_date_components
TestTimestamp
81
null
safety-research/bloom
import json from unittest.mock import patch import pytest class TestMockAPIRouter: def test_router_logs_calls(self, mock_api_router): """Router logs all API calls.""" mock_api_router.set_stage("understanding") mock_api_router() mock_api_router() assert len(mock_api_route...
2
assert
numeric_literal
tests/test_pipeline.py
test_router_logs_calls
TestMockAPIRouter
108
null
safety-research/bloom
import json import tempfile from pathlib import Path from bloom.transcript_utils import ( add_transcript_event, format_transcript_for_judge, generate_id, get_transcript_format, init_transcript_metadata, load_transcript, ) class TestGetTranscriptFormat: def test_combines_metadata_and_event...
events
assert
variable
tests/test_transcript_utils.py
test_combines_metadata_and_events
TestGetTranscriptFormat
130
null
safety-research/bloom
import json import tempfile from pathlib import Path from bloom.transcript_utils import ( add_transcript_event, format_transcript_for_judge, generate_id, get_transcript_format, init_transcript_metadata, load_transcript, ) class TestInitTranscriptMetadata: def test_creates_metadata(self): ...
"v3.0"
assert
string_literal
tests/test_transcript_utils.py
test_creates_metadata
TestInitTranscriptMetadata
113
null
safety-research/bloom
import json import tempfile from pathlib import Path from bloom.transcript_utils import ( add_transcript_event, format_transcript_for_judge, generate_id, get_transcript_format, init_transcript_metadata, load_transcript, ) class TestAddTranscriptEvent: def test_adds_tool_message(self): ...
"tool"
assert
string_literal
tests/test_transcript_utils.py
test_adds_tool_message
TestAddTranscriptEvent
79
null
safety-research/bloom
from bloom.stages.interactive_chat import ( append_event, build_transcript_header, timestamp, ) class TestAppendEvent: def test_appends_event_to_transcript(self): """Should append event with turn, event type, and content.""" transcript = {"events": []} append_event(transcript,...
"user_message"
assert
string_literal
tests/test_interactive_chat.py
test_appends_event_to_transcript
TestAppendEvent
39
null
safety-research/bloom
import json import tempfile from pathlib import Path from bloom.transcript_utils import ( add_transcript_event, format_transcript_for_judge, generate_id, get_transcript_format, init_transcript_metadata, load_transcript, ) class TestAddTranscriptEvent: def test_adds_basic_event(self): ...
"add"
assert
string_literal
tests/test_transcript_utils.py
test_adds_basic_event
TestAddTranscriptEvent
44
null
safety-research/bloom
import json import tempfile from pathlib import Path from bloom.transcript_utils import ( add_transcript_event, format_transcript_for_judge, generate_id, get_transcript_format, init_transcript_metadata, load_transcript, ) class TestGenerateId: def test_generates_unique_ids(self): ...
100
assert
numeric_literal
tests/test_transcript_utils.py
test_generates_unique_ids
TestGenerateId
29
null
safety-research/bloom
import json from unittest.mock import patch import pytest class TestMockAPIRouter: def test_router_understanding_response(self, mock_api_router, spb_fixtures): """Router returns correct understanding response.""" mock_api_router.set_stage("understanding") response = mock_api_router() ...
content
assert
variable
tests/test_pipeline.py
test_router_understanding_response
TestMockAPIRouter
64
null
safety-research/bloom
import json from unittest.mock import patch import pytest class TestJudgmentStage: def test_judgment_scores_transcripts(self, mock_litellm_for_bloom, test_config, populated_results_dir): """Judgment stage produces scores for transcripts.""" import asyncio from bloom.stages.step4_judgment...
None
assert
none_literal
tests/test_pipeline.py
test_judgment_scores_transcripts
TestJudgmentStage
181
null
safety-research/bloom
from bloom.stages.interactive_chat import ( append_event, build_transcript_header, timestamp, ) class TestAppendEvent: def test_appends_multiple_events(self): """Should append multiple events in order.""" transcript = {"events": []} append_event(transcript, turn=1, event="user...
"Hello!"
assert
string_literal
tests/test_interactive_chat.py
test_appends_multiple_events
TestAppendEvent
52
null
temporalio/samples-python
import sys import unittest.mock from collections import abc import pytest import sentry_sdk import temporalio.activity import temporalio.workflow from sentry_sdk.integrations.asyncio import AsyncioIntegration from temporalio.client import Client from temporalio.worker import Worker from temporalio.worker.workflow_san...
"Activity failed!"
assert
string_literal
tests/sentry/test_interceptor.py
test_sentry_interceptor_captures_errors
110
null
temporalio/samples-python
import uuid import pytest from temporalio.client import Client, WorkflowUpdateFailedError from temporalio.testing import WorkflowEnvironment from temporalio.worker import Worker from message_passing.introduction.starter import TASK_QUEUE from message_passing.introduction.workflows import ( GetLanguagesInput, ...
WorkflowUpdateFailedError)
pytest.raises
variable
tests/message_passing/introduction/test_introduction_sample.py
test_set_invalid_language
90
null
temporalio/samples-python
import sys import uuid import pytest import trio_asyncio from temporalio.client import Client from temporalio.worker import Worker from trio_async import activities, workflows async def test_workflow_with_trio(client: Client): @trio_asyncio.aio_as_trio async def inside_trio(client: Client) -> list[str]: ...
[ "Hello, some-user! (from asyncio)", "Hello, some-user! (from thread)", ]
assert
collection
tests/trio_async/workflow_test.py
test_workflow_with_trio
48
null
temporalio/samples-python
import sys import unittest.mock from collections import abc import pytest import sentry_sdk import temporalio.activity import temporalio.workflow from sentry_sdk.integrations.asyncio import AsyncioIntegration from temporalio.client import Client from temporalio.worker import Worker from temporalio.worker.workflow_san...
"ApplicationError"
assert
string_literal
tests/sentry/test_interceptor.py
test_sentry_interceptor_captures_errors
141
null
temporalio/samples-python
import uuid from datetime import timedelta from temporalio import activity from temporalio.testing import WorkflowEnvironment from temporalio.worker import Worker from sleep_for_days.starter import TASK_QUEUE from sleep_for_days.workflows import SendEmailInput, SleepForDaysWorkflow async def test_sleep_for_days_work...
4
assert
numeric_literal
tests/sleep_for_days/workflow_test.py
test_sleep_for_days_workflow
47
null
temporalio/samples-python
import uuid import pytest from temporalio.client import Client, WorkflowUpdateFailedError from temporalio.testing import WorkflowEnvironment from temporalio.worker import Worker from message_passing.introduction.starter import TASK_QUEUE from message_passing.introduction.workflows import ( GetLanguagesInput, ...
Language.ARABIC
assert
complex_expr
tests/message_passing/introduction/test_introduction_sample.py
test_set_language_that_is_only_available_via_remote_service
125
null
temporalio/samples-python
import random import uuid from typing import Dict, List from unittest import mock import pytest from temporalio import activity, exceptions from temporalio.client import Client, WorkflowFailureError from temporalio.testing import WorkflowEnvironment from temporalio.worker import Worker from worker_specific_task_queue...
{1}
assert
collection
tests/activity_sticky_queues/activity_sticky_worker_workflow_test.py
test_worker_runs
130
null
temporalio/samples-python
import uuid from temporalio.client import Client from temporalio.worker import Worker from eager_wf_start.activities import greeting from eager_wf_start.workflows import EagerWorkflow async def test_eager_wf_start(client: Client): task_queue_name = str(uuid.uuid4()) async with Worker( client, ...
"Hello Temporal!"
assert
string_literal
tests/eager_wf_start/workflow_test.py
test_eager_wf_start
29
null
temporalio/samples-python
import asyncio from collections import defaultdict from typing import Any, Optional, Sequence from temporalio import activity from temporalio.client import Client, WorkflowFailureError, WorkflowHandle from temporalio.common import WorkflowIDConflictPolicy from temporalio.worker import Worker from resource_pool.pool_c...
workflow_id
assert
variable
tests/resource_pool/workflow_test.py
test_resource_pool_workflow
67
null