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
Cranot/roam-code
from __future__ import annotations import json import sys from pathlib import Path sys.path.insert(0, str(Path(__file__).parent)) from conftest import invoke_cli class TestHealthGate: def test_gate_text_output_format(self, cli_runner, indexed_project, monkeypatch): """Text gate output should have VERDIC...
result.output
assert
complex_expr
tests/test_health_gate.py
test_gate_text_output_format
TestHealthGate
78
null
Cranot/roam-code
from __future__ import annotations import json import sys from pathlib import Path import pytest sys.path.insert(0, str(Path(__file__).parent)) from conftest import ( assert_json_envelope, git_init, index_in_process, invoke_cli, parse_json_output, ) def cli_runner(): from click.testing impor...
True
assert
bool_literal
tests/test_attest.py
test_safe_when_no_issues
TestComputeVerdict
374
null
Cranot/roam-code
from __future__ import annotations from pathlib import Path def _make_migration_dir(tmp_path: Path, filename: str, content: str) -> list[str]: """Create a migration file under a migrations/ subdir and return rel paths.""" mig_dir = tmp_path / "database" / "migrations" mig_dir.mkdir(parents=True, exist_ok=...
None
assert
none_literal
tests/test_backend_fixes_round3.py
test_information_schema_columns
TestInfoSchemaGuardRegex
156
null
Cranot/roam-code
from __future__ import annotations import sys from pathlib import Path import pytest from click.testing import CliRunner sys.path.insert(0, str(Path(__file__).parent)) from conftest import ( assert_json_envelope, git_commit, git_init, index_in_process, invoke_cli, parse_json_output, ) def cl...
0
assert
numeric_literal
tests/test_alerts_cmd.py
multi_snapshot_project
100
null
Cranot/roam-code
from __future__ import annotations import sys from pathlib import Path import pytest from click.testing import CliRunner sys.path.insert(0, str(Path(__file__).parent)) from conftest import ( assert_json_envelope, git_init, index_in_process, invoke_cli, parse_json_output, ) def cli_runner(): ...
g
assert
variable
tests/test_split_cmd.py
test_json_group_fields
TestSplitJSON
193
null
Cranot/roam-code
from __future__ import annotations import pytest from click.testing import CliRunner def _make_graph(edges): if not HAS_NX: pytest.skip("networkx not installed") G = nx.DiGraph() for src, tgt in edges: G.add_edge(src, tgt) return G def _linear_graph(): return _make_graph([(1, 2),...
0
assert
numeric_literal
tests/test_context_propagation.py
test_callee_files_get_scores
TestPropagationScoresDB
421
null
Cranot/roam-code
from __future__ import annotations def _parse_py(source_text: str, file_path: str = "example.py"): """Parse Python source and return (symbols, references).""" from tree_sitter_language_pack import get_parser from roam.index.parser import GRAMMAR_ALIASES from roam.languages.registry import get_extracto...
"30"
assert
string_literal
tests/test_python_extractor_v2.py
test_default_value_extraction
TestInitAttributes
147
null
Cranot/roam-code
from __future__ import annotations import pytest from roam.bridges import registry as bridge_registry from roam.bridges.base import LanguageBridge from roam.bridges.bridge_protobuf import ProtobufBridge from roam.bridges.bridge_salesforce import SalesforceBridge def _reset_registry(): """Clear the global bridge ...
1
assert
numeric_literal
tests/test_bridges.py
test_register_and_get
TestBridgeRegistry
72
null
Cranot/roam-code
from __future__ import annotations import sys from pathlib import Path import pytest sys.path.insert(0, str(Path(__file__).parent)) from conftest import ( assert_json_envelope, git_commit, git_init, index_in_process, invoke_cli, parse_json_output, ) def cli_runner(): from click.testing i...
fp
assert
variable
tests/test_pr_diff.py
test_pr_diff_footprint
TestPrDiff
270
null
Cranot/roam-code
import json import re import sys from pathlib import Path import pytest ROOT = Path(__file__).resolve().parents[1] SRC = ROOT / "src" from roam.competitor_site_data import ( CRITERIA_DATA, SCORING_RUBRIC, build_site_payload, compute_scores, default_output_path, default_tracker_path, ) from ro...
9
assert
numeric_literal
tests/test_competitor_site_data.py
test_site_payload_has_expected_shape_and_count
38
null
Cranot/roam-code
from __future__ import annotations import sys from pathlib import Path from click.testing import CliRunner sys.path.insert(0, str(Path(__file__).parent)) from conftest import invoke_cli, parse_json_output class TestAlgoCLILanguageTips: def test_json_findings_have_language_and_tip_fields(self, project_factory, ...
f
assert
variable
tests/test_math_tips.py
test_json_findings_have_language_and_tip_fields
TestAlgoCLILanguageTips
252
null
Cranot/roam-code
from __future__ import annotations import json import os import sys from pathlib import Path import pytest sys.path.insert(0, str(Path(__file__).parent)) from conftest import ( git_init, index_in_process, invoke_cli, ) class TestEstimateTokens: def test_basic_estimate(self): """4 chars = 1 ...
1
assert
numeric_literal
tests/test_budget_flag.py
test_basic_estimate
TestEstimateTokens
212
null
Cranot/roam-code
from __future__ import annotations import importlib.util import json import sys from copy import deepcopy from pathlib import Path def _load_sarif_guard_module(): """Load .github/scripts/sarif_guard.py as a Python module.""" root = Path(__file__).resolve().parents[1] script = root / ".github" / "scripts" ...
4
assert
numeric_literal
tests/test_ci_sarif_guard.py
test_apply_guardrails_run_and_result_caps
75
null
Cranot/roam-code
from __future__ import annotations import os import pytest from tests.conftest import assert_json_envelope, invoke_cli, parse_json_output def orch_project(project_factory): return project_factory( { "auth/login.py": ("from auth.tokens import create_token\ndef authenticate(u, p): return creat...
cp
assert
variable
tests/test_orchestrate.py
test_partition_conflict_probability
TestPartitionForAgents
160
null
Cranot/roam-code
from __future__ import annotations import sys from pathlib import Path import pytest from click.testing import CliRunner sys.path.insert(0, str(Path(__file__).parent)) from conftest import assert_json_envelope, invoke_cli, parse_json_output def cli_runner(): """Provide a Click CliRunner compatible with Click 8....
0
assert
numeric_literal
tests/test_commands_architecture.py
test_map_shows_files
TestMap
51
null
Cranot/roam-code
from __future__ import annotations import json import sys from pathlib import Path import pytest from click.testing import CliRunner sys.path.insert(0, str(Path(__file__).parent)) from conftest import assert_json_envelope, invoke_cli, parse_json_output from roam.cli import cli def cli_runner(): """Provide a Cl...
1
assert
numeric_literal
tests/test_affected.py
test_affected_json_has_changed_files
TestAffected
195
null
Cranot/roam-code
from __future__ import annotations import pytest from click.testing import CliRunner def _make_graph(edges): if not HAS_NX: pytest.skip("networkx not installed") G = nx.DiGraph() for src, tgt in edges: G.add_edge(src, tgt) return G def _linear_graph(): return _make_graph([(1, 2),...
[]
assert
collection
tests/test_context_propagation.py
test_leaf_node_empty_chain
TestCalleeChain
321
null
Cranot/roam-code
from __future__ import annotations from tree_sitter_language_pack import get_parser from roam.index.parser import GRAMMAR_ALIASES from roam.languages.registry import get_extractor def _parse_and_extract(source_text: str, language: str, file_path: str): grammar = GRAMMAR_ALIASES.get(language, language) parser...
"5"
assert
string_literal
tests/test_kotlin_swift_extractors.py
test_swift_protocol_struct_enum_constructor_and_properties
TestSwiftExtractor
108
null
Cranot/roam-code
from __future__ import annotations import sqlite3 from unittest.mock import patch import pytest def tmp_db(tmp_path): """Create a minimal in-memory-style SQLite DB with required tables.""" db_path = tmp_path / ".roam" / "index.db" db_path.parent.mkdir(parents=True) conn = sqlite3.connect(str(db_path...
1
assert
numeric_literal
tests/test_batch_mcp.py
test_fts_hit
TestBatchSearchOne
236
null
Cranot/roam-code
from __future__ import annotations import json import os import sys from pathlib import Path import click import pytest from click.testing import CliRunner sys.path.insert(0, str(Path(__file__).parent)) from conftest import ( git_commit, git_init, index_in_process, ) def _make_local_cli(): """Return...
0
assert
numeric_literal
tests/test_bisect.py
_parse_json
80
null
Cranot/roam-code
from __future__ import annotations import json import os import subprocess from pathlib import Path import click import pytest from click.testing import CliRunner from conftest import git_init, index_in_process def _make_local_cli(): from roam.commands.cmd_trends import trends @click.group() @click.opti...
ai
assert
variable
tests/test_trends_cohort.py
test_trends_cohort_json_shape
130
null
Cranot/roam-code
from __future__ import annotations import json class TestToJsonDeterministic: def test_sort_keys_enabled(self): """to_json() must use sort_keys=True.""" from roam.output.formatter import to_json data = {"zebra": 1, "alpha": 2, "middle": 3} result = to_json(data) parsed = ...
sorted(keys)
assert
func_call
tests/test_deterministic_output.py
test_sort_keys_enabled
TestToJsonDeterministic
28
null
Cranot/roam-code
from __future__ import annotations import asyncio import importlib import os import pytest def full_preset_tools(): """Load MCP server with full preset and return tool list.""" # Force full preset so all tools are registered env_backup = os.environ.get("ROAM_MCP_PRESET") os.environ["ROAM_MCP_PRESET"]...
[]
assert
collection
tests/test_defer_loading.py
test_non_core_tools_deferred
TestDeferLoading
91
null
Cranot/roam-code
from __future__ import annotations import sys from pathlib import Path import pytest from click.testing import CliRunner sys.path.insert(0, str(Path(__file__).parent)) from conftest import assert_json_envelope, invoke_cli, parse_json_output from roam.cli import cli def cli_runner(): """Provide a Click CliRunne...
0
assert
numeric_literal
tests/test_closure.py
test_closure_finds_definition
TestClosure
91
null
Cranot/roam-code
from __future__ import annotations import sys from pathlib import Path import pytest sys.path.insert(0, str(Path(__file__).parent)) from conftest import ( assert_json_envelope, git_commit, git_init, index_in_process, invoke_cli, parse_json_output, ) def cli_runner(): from click.testing i...
v
assert
variable
tests/test_verify.py
test_json_violation_fields
TestJsonOutput
416
null
Cranot/roam-code
import json import re import sys from pathlib import Path import pytest ROOT = Path(__file__).resolve().parents[1] SRC = ROOT / "src" from roam.competitor_site_data import ( CRITERIA_DATA, SCORING_RUBRIC, build_site_payload, compute_scores, default_output_path, default_tracker_path, ) from ro...
0
assert
numeric_literal
tests/test_competitor_site_data.py
test_rubric_in_payload
157
null
Cranot/roam-code
from __future__ import annotations import json import os import shutil import sqlite3 import sys import time from unittest.mock import patch from click.testing import CliRunner from roam.cli import cli def invoke_doctor(*args): """Invoke `roam doctor` via CliRunner and return the result.""" runner = CliRunn...
True
assert
bool_literal
tests/test_doctor.py
test_python_check_passes_current_version
TestDoctorPythonCheck
130
null
Cranot/roam-code
from __future__ import annotations import json import os import sys from pathlib import Path import pytest sys.path.insert(0, str(Path(__file__).parent)) from conftest import ( assert_json_envelope, git_init, index_in_process, ) def _invoke_capsule(runner, args=None, cwd=None, json_mode=False): """I...
1
assert
numeric_literal
tests/test_capsule.py
test_capsule_has_topology
TestCapsuleCommand
129
null
Cranot/roam-code
from __future__ import annotations import sys from pathlib import Path import pytest from click.testing import CliRunner sys.path.insert(0, str(Path(__file__).parent)) from conftest import assert_json_envelope, invoke_cli, parse_json_output from roam.cli import cli def cli_runner(): """Provide a Click CliRunne...
out
assert
variable
tests/test_closure.py
test_closure_finds_definition
TestClosure
94
null
Cranot/roam-code
from __future__ import annotations import asyncio import importlib import os import pytest def full_preset_tools(): """Load MCP server with full preset and return tool list.""" # Force full preset so all tools are registered env_backup = os.environ.get("ROAM_MCP_PRESET") os.environ["ROAM_MCP_PRESET"]...
None
assert
none_literal
tests/test_defer_loading.py
test_deferred_tools_have_annotations_object
TestDeferLoading
116
null
Cranot/roam-code
from __future__ import annotations import json import os import sys from pathlib import Path import pytest from click.testing import CliRunner sys.path.insert(0, str(Path(__file__).parent)) from conftest import invoke_cli def fp_project(project_factory): return project_factory( { "api/routes...
fp
assert
variable
tests/test_fingerprint.py
test_compute_fingerprint_returns_dict
TestComputeFingerprint
56
null
Cranot/roam-code
from __future__ import annotations import pytest from tests.conftest import ( assert_json_envelope, git_init, index_in_process, invoke_cli, parse_json_output, ) def laravel_project(tmp_path): """Laravel-style PHP project with a model that has $appends and an accessor that lazy-loads a rel...
"n1"
assert
string_literal
tests/test_n1.py
test_json_command_field_is_n1
TestN1JSON
225
null
Cranot/roam-code
from __future__ import annotations import json import sys from pathlib import Path import pytest from click.testing import CliRunner sys.path.insert(0, str(Path(__file__).parent)) from conftest import assert_json_envelope, invoke_cli, parse_json_output from roam.cli import cli def cli_runner(): """Provide a Cl...
0
assert
numeric_literal
tests/test_affected.py
test_affected_help
TestAffected
119
null
Cranot/roam-code
from __future__ import annotations import sys from pathlib import Path import pytest from click.testing import CliRunner sys.path.insert(0, str(Path(__file__).parent)) from conftest import assert_json_envelope, invoke_cli, parse_json_output def cli_runner(): """Provide a Click CliRunner compatible with Click 8....
0
assert
numeric_literal
tests/test_commands_exploration.py
test_search_finds_symbol
TestSearch
55
null
Cranot/roam-code
from __future__ import annotations import os import pytest def test_graph_metrics_populates_sna_v2_values(indexed_project): from roam.db.connection import open_db old_cwd = os.getcwd() try: os.chdir(str(indexed_project)) with open_db(readonly=True) as conn: row = conn.execute...
cc
assert
variable
tests/test_sna_metrics.py
test_graph_metrics_populates_sna_v2_values
48
null
Cranot/roam-code
from __future__ import annotations import json from roam.output.formatter import ( abbrev_kind, compact_json_envelope, format_edge_kind, format_signature, format_table, format_table_compact, indent, loc, section, symbol_line, table_to_dicts, to_json, truncate_lines,...
"var"
assert
string_literal
tests/test_formatters.py
test_variable
TestAbbrevKind
38
null
Cranot/roam-code
from __future__ import annotations import json import os import re import sys from pathlib import Path import pytest from click.testing import CliRunner sys.path.insert(0, str(Path(__file__).parent)) from conftest import git_init def small_project(tmp_path): """A minimal Python project with a few files for inde...
"42"
assert
string_literal
tests/test_progress.py
test_small_number
TestFormatCount
251
null
Cranot/roam-code
from __future__ import annotations import json import sys from pathlib import Path from click.testing import CliRunner sys.path.insert(0, str(Path(__file__).parent)) from conftest import git_init, index_in_process class TestParseCodeowners: def test_multiple_owners(self, tmp_path): co = tmp_path / "COD...
1
assert
numeric_literal
tests/test_codeowners.py
test_multiple_owners
TestParseCodeowners
48
null
Cranot/roam-code
from __future__ import annotations from roam.commands.gate_presets import ( ALL_PRESETS, GatePreset, GateRule, detect_preset, get_preset, ) class TestGetPreset: def test_get_go_preset(self): p = get_preset("go") assert p is not None assert p.name ==
"go"
assert
string_literal
tests/test_gate_presets.py
test_get_go_preset
TestGetPreset
50
null
Cranot/roam-code
from __future__ import annotations import os import subprocess import textwrap from pathlib import Path import pytest from click.testing import CliRunner from roam.cli import cli def _make_project(tmp_path, files: dict[str, str]) -> Path: """Create a minimal git project with given files.""" proj = tmp_path ...
0
assert
numeric_literal
tests/test_clones.py
test_identical_functions_detected
TestCloneDetectEngine
76
null
Cranot/roam-code
from __future__ import annotations import sys from pathlib import Path sys.path.insert(0, str(Path(__file__).parent)) from conftest import invoke_cli, parse_json_output def test_agent_mode_respects_explicit_budget(cli_runner, indexed_project): """--agent with a tight --budget should produce truncated JSON metada...
True
assert
bool_literal
tests/test_agent_mode.py
test_agent_mode_respects_explicit_budget
34
null
Cranot/roam-code
import json import re import sys from pathlib import Path import pytest ROOT = Path(__file__).resolve().parents[1] SRC = ROOT / "src" from roam.competitor_site_data import ( CRITERIA_DATA, SCORING_RUBRIC, build_site_payload, compute_scores, default_output_path, default_tracker_path, ) from ro...
1
assert
numeric_literal
tests/test_competitor_site_data.py
test_competitor_rows_include_evidence_metadata
55
null
Cranot/roam-code
from __future__ import annotations import importlib.util import json import sys from copy import deepcopy from pathlib import Path def _load_sarif_guard_module(): """Load .github/scripts/sarif_guard.py as a Python module.""" root = Path(__file__).resolve().parents[1] script = root / ".github" / "scripts" ...
1
assert
numeric_literal
tests/test_ci_sarif_guard.py
test_merge_sarif_files_skips_invalid
56
null
Cranot/roam-code
from __future__ import annotations from pathlib import Path ROOT = Path(__file__).resolve().parents[1] def test_dockerfile_is_alpine_based(): text = (ROOT / "Dockerfile").read_text(encoding="utf-8") assert "FROM python:" in text assert "alpine" in
text.lower()
assert
func_call
tests/test_docker_assets.py
test_dockerfile_is_alpine_based
19
null
Cranot/roam-code
import subprocess import sys import pytest def roam_project(tmp_path_factory): """Create a small Python project and index it.""" root = tmp_path_factory.mktemp("project") # Create files (root / "main.py").write_text( 'from helper import add\n\ndef main():\n print(add(1, 2))\n\nif __name__ ...
0
assert
numeric_literal
tests/test_basic.py
test_index
48
null
Cranot/roam-code
from __future__ import annotations import subprocess import pytest from tests.conftest import ( assert_json_envelope, git_init, index_in_process, invoke_cli, parse_json_output, ) def congestion_project(tmp_path): """Project with multiple authors editing the same file.""" proj = tmp_path ...
result.output
assert
complex_expr
tests/test_congestion.py
test_verdict_line
TestCongestionText
79
null
Cranot/roam-code
from __future__ import annotations import pytest from roam.bridges import registry as bridge_registry from roam.bridges.base import LanguageBridge from roam.bridges.bridge_protobuf import ProtobufBridge from roam.bridges.bridge_salesforce import SalesforceBridge def _reset_registry(): """Clear the global bridge ...
2
assert
numeric_literal
tests/test_bridges.py
test_register_multiple
TestBridgeRegistry
78
null
Cranot/roam-code
from __future__ import annotations import json import pytest from roam.exit_codes import EXIT_GATE_FAILURE from tests.conftest import ( assert_json_envelope, git_init, index_in_process, invoke_cli, parse_json_output, ) def docs_project(tmp_path): """Project with mix of documented and undocum...
result.output
assert
complex_expr
tests/test_docs_coverage.py
test_docs_coverage_runs
93
null
Cranot/roam-code
from __future__ import annotations def _make_envelope(items_key="items", items=None, summary=None): """Build a minimal JSON envelope dict for testing.""" return { "command": "test", "summary": summary or {"verdict": "ok"}, items_key: items or [], } class TestSortByImportance: ...
"a"
assert
string_literal
tests/test_pagerank_truncation.py
test_score_key
TestSortByImportance
83
null
Cranot/roam-code
from __future__ import annotations import pytest from tests.conftest import ( assert_json_envelope, git_init, index_in_process, invoke_cli, parse_json_output, ) def flag_project(tmp_path): """Project with feature flag usage patterns.""" proj = tmp_path / "flag_proj" proj.mkdir() (...
result.output
assert
complex_expr
tests/test_flag_dead.py
test_verdict_line
TestFlagDeadText
111
null
Cranot/roam-code
from __future__ import annotations import pytest from click.testing import CliRunner def _make_graph(edges): if not HAS_NX: pytest.skip("networkx not installed") G = nx.DiGraph() for src, tgt in edges: G.add_edge(src, tgt) return G def _linear_graph(): return _make_graph([(1, 2),...
{}
assert
collection
tests/test_context_propagation.py
test_empty_graph_empty_seeds
TestPropagateContext
213
null
Cranot/roam-code
from __future__ import annotations import pytest from tests.conftest import ( assert_json_envelope, git_init, invoke_cli, parse_json_output, ) def ci_project(tmp_path): proj = tmp_path / "ci_proj" proj.mkdir() (proj / ".gitignore").write_text(".roam/\n") (proj / "main.py").write_text(...
0
assert
numeric_literal
tests/test_ci_setup.py
test_explicit_platform_exits_zero
TestCiSetupSmoke
29
null
Cranot/roam-code
from __future__ import annotations import subprocess import pytest from tests.conftest import ( assert_json_envelope, index_in_process, invoke_cli, parse_json_output, ) def _git_config_author(path, name, email): """Set the git author for a repo.""" subprocess.run( ["git", "config", "...
s
assert
variable
tests/test_simulate_departure.py
test_json_key_symbols_structure
TestSimulateDepartureJSON
355
null
Cranot/roam-code
import json import re import sys from pathlib import Path import pytest ROOT = Path(__file__).resolve().parents[1] SRC = ROOT / "src" from roam.competitor_site_data import ( CRITERIA_DATA, SCORING_RUBRIC, build_site_payload, compute_scores, default_output_path, default_tracker_path, ) from ro...
cat
assert
variable
tests/test_competitor_site_data.py
test_rubric_in_payload
152
null
Cranot/roam-code
from __future__ import annotations import pytest from tests.conftest import ( assert_json_envelope, git_init, index_in_process, invoke_cli, parse_json_output, ) def drift_project(tmp_path): """Laravel+TS project with deliberate field mismatches.""" proj = tmp_path / "drift_proj" proj....
0
assert
numeric_literal
tests/test_api_drift.py
test_exits_zero
TestApiDriftSmoke
62
null
Cranot/roam-code
from __future__ import annotations import json import sys from pathlib import Path import pytest sys.path.insert(0, str(Path(__file__).parent)) from conftest import ( assert_json_envelope, git_init, index_in_process, invoke_cli, ) def cli_runner(): from click.testing import CliRunner return...
0
assert
numeric_literal
tests/test_budget.py
budget_project
57
null
Cranot/roam-code
from __future__ import annotations import os import pytest from tests.conftest import ( invoke_cli, parse_json_output, ) def multi_module_project(project_factory): """A project with distinct modules for partition difficulty testing.""" return project_factory( { "auth/login.py": (...
p
assert
variable
tests/test_difficulty_scoring.py
test_difficulty_in_json_output
TestDifficultyInManifest
246
null
Cranot/roam-code
from __future__ import annotations import json import os import sys from pathlib import Path import pytest from click.testing import CliRunner sys.path.insert(0, str(Path(__file__).parent)) from conftest import ( git_init, index_in_process, ) @pytest.fixture def basic_project(tmp_path, monkeypatch): """...
0
assert
numeric_literal
tests/test_budget_phase2.py
basic_project
62
null
Cranot/roam-code
from __future__ import annotations import json import os import pytest from click.testing import CliRunner from tests.conftest import invoke_cli def mutate_project(project_factory): """A small Python project for testing mutate transforms.""" return project_factory( { "models.py": ("class...
"go"
assert
string_literal
tests/test_mutate.py
test_detect_language
TestCodegen
66
null
Cranot/roam-code
from __future__ import annotations import os import pytest from tests.conftest import ( invoke_cli, parse_json_output, ) def multi_module_project(project_factory): """A project with distinct modules for partition difficulty testing.""" return project_factory( { "auth/login.py": (...
[]
assert
collection
tests/test_difficulty_scoring.py
test_empty_partitions
TestComputeDifficultyScore
73
null
Cranot/roam-code
from __future__ import annotations import json import sys from pathlib import Path import pytest sys.path.insert(0, str(Path(__file__).parent)) from conftest import ( assert_json_envelope, git_init, index_in_process, invoke_cli, parse_json_output, ) def cli_runner(): from click.testing impor...
att
assert
variable
tests/test_attest.py
test_attest_has_attestation_metadata
TestAttestEvidence
227
null
Cranot/roam-code
from __future__ import annotations import subprocess import sys from pathlib import Path import pytest sys.path.insert(0, str(Path(__file__).parent)) from conftest import ( assert_json_envelope, git_commit, git_init, index_in_process, invoke_cli, parse_json_output, ) def cli_runner(): fr...
0
assert
numeric_literal
tests/test_api_changes.py
test_removed_function
TestRemovedSymbols
82
null
Cranot/roam-code
from __future__ import annotations import networkx as nx import pytest from tests.conftest import ( assert_json_envelope, git_init, index_in_process, invoke_cli, parse_json_output, ) def sim_project(tmp_path): """A multi-file project suitable for simulate testing. auth/login.py: authenti...
G
assert
variable
tests/test_simulate.py
test_clone_graph_independent
TestCloneGraph
202
null
Cranot/roam-code
from __future__ import annotations import json from unittest import mock from click.testing import CliRunner from roam.commands.cmd_supply_chain import ( Dependency, _parse_cargo_toml, _parse_gemfile, _parse_go_mod, _parse_package_json, _parse_pyproject_toml, _parse_requirements_txt, ...
m
assert
variable
tests/test_supply_chain.py
test_compute_risk_score_fields
462
null
Cranot/roam-code
from __future__ import annotations import sys from pathlib import Path import pytest from click.testing import CliRunner sys.path.insert(0, str(Path(__file__).parent)) from conftest import ( assert_json_envelope, git_init, index_in_process, invoke_cli, parse_json_output, ) def cli_runner(): ...
1
assert
numeric_literal
tests/test_conventions_cmd.py
test_json_summary_has_total_symbols
TestConventionsJSON
275
null
Cranot/roam-code
from __future__ import annotations import sys from pathlib import Path sys.path.insert(0, str(Path(__file__).parent)) from conftest import invoke_cli, parse_json_output from roam.commands.cmd_dead import _decay_score, _decay_tier, _estimate_removal_minutes class TestDecayScore: def test_score_bounded_0_to_100(...
low
assert
variable
tests/test_dead_aging.py
test_score_bounded_0_to_100
TestDecayScore
56
null
Cranot/roam-code
from __future__ import annotations from pathlib import Path def _make_migration_dir(tmp_path: Path, filename: str, content: str) -> list[str]: """Create a migration file under a migrations/ subdir and return rel paths.""" mig_dir = tmp_path / "database" / "migrations" mig_dir.mkdir(parents=True, exist_ok=...
0
assert
numeric_literal
tests/test_backend_fixes_round3.py
test_has_table_guards_add_column
TestHasTableGuard
203
null
Cranot/roam-code
from __future__ import annotations import subprocess import pytest from tests.conftest import ( assert_json_envelope, git_init, index_in_process, invoke_cli, parse_json_output, ) def _git_commit_as(path, author_name, author_email, message): """Make a git commit with an explicit author identi...
0
assert
numeric_literal
tests/test_bus_factor.py
test_exits_zero
TestBusFactorSmoke
154
null
Cranot/roam-code
from __future__ import annotations import importlib.util import json import sys from copy import deepcopy from pathlib import Path def _load_sarif_guard_module(): """Load .github/scripts/sarif_guard.py as a Python module.""" root = Path(__file__).resolve().parents[1] script = root / ".github" / "scripts" ...
3
assert
numeric_literal
tests/test_ci_sarif_guard.py
test_apply_guardrails_run_and_result_caps
72
null
Cranot/roam-code
"\n" " abstract validate(): boolean;\n" "}\n" ) (ts_dir / "user.ts").write_text( 'import { BaseEntity } from "./base";\n' 'import { Serializable } from "./interfaces";\n' "\n" "export class User extends BaseEntity implements Serializable {\n" ' ...
0
assert
numeric_literal
tests/test_comprehensive.py
polyglot
794
null
Cranot/roam-code
from __future__ import annotations import json import os import sys from pathlib import Path import pytest sys.path.insert(0, str(Path(__file__).parent)) from conftest import ( assert_json_envelope, git_init, index_in_process, ) def _invoke_capsule(runner, args=None, cwd=None, json_mode=False): """I...
c
assert
variable
tests/test_capsule.py
test_capsule_has_clusters
TestCapsuleCommand
281
null
Cranot/roam-code
from __future__ import annotations import pytest from roam.bridges import registry as bridge_registry from roam.bridges.base import LanguageBridge from roam.bridges.bridge_protobuf import ProtobufBridge from roam.bridges.bridge_salesforce import SalesforceBridge def _reset_registry(): """Clear the global bridge ...
[]
assert
collection
tests/test_bridges.py
test_registry_starts_empty_after_clear
TestBridgeRegistry
66
null
Cranot/roam-code
from __future__ import annotations import sys from pathlib import Path from click.testing import CliRunner sys.path.insert(0, str(Path(__file__).parent)) from conftest import invoke_cli, parse_json_output class TestGetTip: def test_default_fallback_for_unknown_language(self): from roam.catalog.tasks im...
""
assert
string_literal
tests/test_math_tips.py
test_default_fallback_for_unknown_language
TestGetTip
60
null
Cranot/roam-code
from __future__ import annotations import json import os import sys from pathlib import Path import click import pytest from click.testing import CliRunner sys.path.insert(0, str(Path(__file__).parent)) from conftest import ( git_commit, git_init, index_in_process, ) def _make_local_cli(): """Return...
1
assert
numeric_literal
tests/test_bisect.py
test_bisect_top_n
TestBisectCommand
373
null
Cranot/roam-code
from __future__ import annotations import random import sqlite3 import string import pytest import networkx as nx from roam.db.connection import batched_in, ensure_schema from roam.graph.simulate import clone_graph, metric_delta from roam.output.formatter import ( KIND_ABBREV, abbrev_kind, format_table,...
G
assert
variable
tests/test_properties.py
test_clone_independence_add_node
TestCloneGraphProperties
544
null
Cranot/roam-code
from __future__ import annotations import pytest from tests.conftest import ( assert_json_envelope, git_init, index_in_process, invoke_cli, parse_json_output, ) def staleness_project(tmp_path): """Project with a docstring that might go stale.""" proj = tmp_path / "stale_proj" proj.mkd...
result.output
assert
complex_expr
tests/test_doc_staleness.py
test_verdict_line
TestDocStalenessText
70
null
Cranot/roam-code
from __future__ import annotations import json import os import pytest from click.testing import CliRunner from tests.conftest import git_init, index_in_process def secrets_project(project_factory): """Create a project with deliberately planted fake secrets for testing.""" return project_factory( { ...
r
assert
variable
tests/test_secrets.py
test_sarif_has_results
TestSarifOutput
446
null
Cranot/roam-code
from __future__ import annotations import networkx as nx import pytest from tests.conftest import ( assert_json_envelope, git_init, index_in_process, invoke_cli, parse_json_output, ) def sim_project(tmp_path): """A multi-file project suitable for simulate testing. auth/login.py: authenti...
d
assert
variable
tests/test_simulate.py
test_metrics_have_direction
TestMetricCorrectness
447
null
Cranot/roam-code
from __future__ import annotations import json import os import sys from pathlib import Path import pytest from click.testing import CliRunner sys.path.insert(0, str(Path(__file__).parent)) from conftest import git_init, index_in_process def cli_runner(): return CliRunner() @pytest.fixture def well_structured_...
0
assert
numeric_literal
tests/test_ai_readiness.py
well_structured_project
96
null
Cranot/roam-code
from __future__ import annotations import json import os import sys from pathlib import Path import pytest sys.path.insert(0, str(Path(__file__).parent)) from conftest import ( assert_json_envelope, git_init, index_in_process, ) def _invoke_capsule(runner, args=None, cwd=None, json_mode=False): """I...
sym
assert
variable
tests/test_capsule.py
test_capsule_has_symbols
TestCapsuleCommand
143
null
Cranot/roam-code
from __future__ import annotations import json import os import sys from pathlib import Path import pytest from click.testing import CliRunner sys.path.insert(0, str(Path(__file__).parent)) from conftest import git_init, index_in_process def run_adversarial(proj, args=None, json_mode=False): """Invoke the adver...
""
assert
string_literal
tests/test_adversarial.py
test_challenge_builder_default_location
TestAdversarialInternalFunctions
526
null
Cranot/roam-code
from __future__ import annotations import pytest from tests.conftest import ( assert_json_envelope, git_init, index_in_process, invoke_cli, parse_json_output, ) def adr_project(tmp_path): proj = tmp_path / "adr_proj" proj.mkdir() (proj / ".gitignore").write_text(".roam/\n") # Sou...
result.output
assert
complex_expr
tests/test_adrs.py
test_verdict_line
TestAdrsText
98
null
Cranot/roam-code
from __future__ import annotations import sys from pathlib import Path sys.path.insert(0, str(Path(__file__).parent)) from roam.analysis.effects import ( CACHE, FILESYSTEM, LOGGING, MUTATES_GLOBAL, NETWORK, QUEUE, RANDOM, READS_DB, TIME, WRITES_DB, classify_symbol_effects,...
set()
assert
func_call
tests/test_effects.py
test_unknown_language_returns_empty
TestUnsupportedLanguage
303
null
Cranot/roam-code
from __future__ import annotations import json import os import sys from pathlib import Path import pytest sys.path.insert(0, str(Path(__file__).parent)) from conftest import ( assert_json_envelope, git_init, index_in_process, ) def _invoke_capsule(runner, args=None, cwd=None, json_mode=False): """I...
0
assert
numeric_literal
tests/test_capsule.py
_parse_capsule_json
58
null
Cranot/roam-code
from __future__ import annotations import json import os import sys from pathlib import Path import pytest from click.testing import CliRunner sys.path.insert(0, str(Path(__file__).parent)) from conftest import git_init, index_in_process def cli_runner(): return CliRunner() def well_structured_project(tmp_path...
2
assert
numeric_literal
tests/test_ai_readiness.py
test_contributions_sum_near_composite
TestAiReadinessEdgeCases
526
null
Cranot/roam-code
from __future__ import annotations import asyncio import importlib import os import pytest def full_preset_tools(): """Load MCP server with full preset and return tool list.""" # Force full preset so all tools are registered env_backup = os.environ.get("ROAM_MCP_PRESET") os.environ["ROAM_MCP_PRESET"]...
len(set(names))
assert
func_call
tests/test_defer_loading.py
test_all_tool_names_unique
TestDeferLoading
122
null
Cranot/roam-code
from __future__ import annotations import asyncio import importlib import os import pytest def full_preset_tools(): """Load MCP server with full preset and return tool list.""" # Force full preset so all tools are registered env_backup = os.environ.get("ROAM_MCP_PRESET") os.environ["ROAM_MCP_PRESET"]...
len(core_names)
assert
func_call
tests/test_defer_loading.py
test_core_tools_not_deferred
TestDeferLoading
59
null
Cranot/roam-code
from __future__ import annotations import json import os import sys from pathlib import Path import pytest sys.path.insert(0, str(Path(__file__).parent)) from conftest import ( assert_json_envelope, git_init, index_in_process, ) def _invoke_capsule(runner, args=None, cwd=None, json_mode=False): """I...
m
assert
variable
tests/test_capsule.py
test_capsule_has_symbols
TestCapsuleCommand
150
null
Cranot/roam-code
from __future__ import annotations import sys from pathlib import Path import pytest from click.testing import CliRunner sys.path.insert(0, str(Path(__file__).parent)) from conftest import assert_json_envelope, invoke_cli, parse_json_output def agent_project(project_factory): return project_factory( { ...
0
assert
numeric_literal
tests/test_agent_plan_context.py
test_agent_context_invalid_agent
102
null
Cranot/roam-code
from __future__ import annotations import json import os import sys from pathlib import Path import pytest sys.path.insert(0, str(Path(__file__).parent)) from conftest import ( git_init, index_in_process, invoke_cli, ) @pytest.fixture def health_project(tmp_path, monkeypatch): """Minimal indexed pro...
0
assert
numeric_literal
tests/test_budget_flag.py
health_project
354
null
Cranot/roam-code
from __future__ import annotations import pytest from click.testing import CliRunner def _make_graph(edges): if not HAS_NX: pytest.skip("networkx not installed") G = nx.DiGraph() for src, tgt in edges: G.add_edge(src, tgt) return G def _linear_graph(): return _make_graph([(1, 2),...
v
assert
variable
tests/test_context_propagation.py
test_basic_blend_in_range
TestMergeRankings
353
null
Cranot/roam-code
from __future__ import annotations import json import sys from pathlib import Path import pytest sys.path.insert(0, str(Path(__file__).parent)) from conftest import git_commit, git_init, index_in_process, roam from roam.graph.anomaly import ( cusum, forecast, mann_kendall_test, modified_z_score, ...
5
assert
numeric_literal
tests/test_anomaly.py
test_all_equal_values_mad_zero
TestModifiedZScore
74
null
Cranot/roam-code
from __future__ import annotations class TestMdxExtension: def test_mdx_extension_detected(self): """A .mdx file should be detected as the 'mdx' language.""" from roam.languages.registry import get_language_for_file lang = get_language_for_file("page.mdx") assert lang ==
"mdx"
assert
string_literal
tests/test_backend_fixes_round2.py
test_mdx_extension_detected
TestMdxExtension
232
null
Cranot/roam-code
from __future__ import annotations import json import pytest from roam.bridges import registry as bridge_registry from roam.bridges.bridge_config import ConfigBridge from roam.bridges.bridge_rest_api import RestApiBridge from roam.bridges.bridge_template import TemplateBridge from tests.conftest import invoke_cli d...
True
assert
bool_literal
tests/test_bridges_extended.py
test_rest_api_bridge_detect
TestRestApiBridge
101
null
Cranot/roam-code
from __future__ import annotations import sys from pathlib import Path sys.path.insert(0, str(Path(__file__).parent)) from conftest import invoke_cli, parse_json_output from roam.commands.cmd_dead import _decay_score, _decay_tier, _estimate_removal_minutes class TestDeadAgingJSON: def test_json_dead_aging_incl...
sym
assert
variable
tests/test_dead_aging.py
test_json_dead_aging_includes_aging_data
TestDeadAgingJSON
370
null
Cranot/roam-code
from __future__ import annotations import json import sqlite3 import sys from pathlib import Path import pytest sys.path.insert(0, str(Path(__file__).parent)) from conftest import git_commit, git_init, index_in_process, invoke_cli @pytest.fixture def annotated_project(tmp_path): """Create an indexed Python proj...
0
assert
numeric_literal
tests/test_annotations.py
annotated_project
293
null
Cranot/roam-code
from __future__ import annotations import json import sqlite3 from pathlib import Path import networkx as nx import pytest from click.testing import CliRunner from roam.cli import cli def _make_db(tmp_path: Path) -> sqlite3.Connection: db_path = tmp_path / ".roam" / "index.db" db_path.parent.mkdir(parents=T...
1
assert
numeric_literal
tests/test_check_rules.py
test_builtin_rule_evaluate_fn_error
145
null
Cranot/roam-code
from __future__ import annotations import json import sys from pathlib import Path import pytest sys.path.insert(0, str(Path(__file__).parent)) from conftest import ( assert_json_envelope, git_init, index_in_process, invoke_cli, ) def cli_runner(): from click.testing import CliRunner return...
6
assert
numeric_literal
tests/test_budget.py
test_budget_default_budgets
TestBudget
196
null
Cranot/roam-code
from __future__ import annotations import importlib.util from pathlib import Path def _load_gate_eval_module(): """Load .github/scripts/gate_eval.py as a Python module.""" root = Path(__file__).resolve().parents[1] script = root / ".github" / "scripts" / "gate_eval.py" spec = importlib.util.spec_from_...
True
assert
bool_literal
tests/test_ci_gate_eval.py
test_scalar_gate_pass
25
null
Cranot/roam-code
from __future__ import annotations import json import sys import time from pathlib import Path from click.testing import CliRunner sys.path.insert(0, str(Path(__file__).parent)) from conftest import ( assert_json_envelope, git_init, index_in_process, invoke_cli, parse_json_output, ) class TestHe...
""
assert
string_literal
tests/test_drift.py
test_top_contributor_empty
TestHelpers
471
null