repo_id
stringclasses
400 values
commit_sha
stringclasses
400 values
commit_index
int32
0
951
in_repo_split
stringclasses
1 value
cross_repo_split
stringclasses
1 value
test_file
stringlengths
7
121
test_function
stringlengths
1
108
assertion_type
stringclasses
32 values
difficulty
stringclasses
8 values
context_lines
int32
3
600
prefix
large_stringlengths
44
113k
target
large_stringlengths
1
498
anchor_sha
stringclasses
400 values
anchor_index
int32
0
951
qna_source
stringclasses
1 value
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/tests/commands/test_cli.py
test_scan_rejects_subcommand_lang_position
assert
variable
38
from __future__ import annotations import json from pathlib import Path from types import SimpleNamespace from unittest.mock import patch import pytest import desloppify.app.commands.helpers.lang as lang_helpers_mod import desloppify.cli as cli_mod from desloppify.app.commands.helpers.lang import resolve_lang, resol...
err
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/tests/commands/test_cmd_fix.py
test_basic_output
assert
variable
32
import pytest import desloppify.app.commands.fix.apply_flow as fix_apply_mod from desloppify.app.commands.fix.apply_flow import ( _SKIP_REASON_LABELS, _print_fix_retro, _print_fix_summary, _resolve_fixer_results, ) from desloppify.app.commands.fix.cmd import ( cmd_fix, ) from desloppify.languages._...
out
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/tests/commands/test_cmd_next.py
test_requires_prior_scan
assert
variable
69
from __future__ import annotations import inspect from types import SimpleNamespace import desloppify.intelligence.narrative as narrative_mod import desloppify.utils as utils_mod from desloppify.app.commands import next as next_mod from desloppify.app.commands.helpers.runtime import CommandRuntime from desloppify.app...
out
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/tests/commands/test_cmd_plan.py
test_no_scan_prints_warning
assert
variable
29
import inspect import desloppify.engine.planning.core as plan_mod from desloppify.app.commands import plan_cmd from desloppify.app.commands.plan_cmd import cmd_plan_output class TestCmdPlanOutput: def test_no_scan_prints_warning(self, monkeypatch, capsys): """When no scan has been performed, should print...
out
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/tests/commands/test_cmd_resolve.py
test_fixed_without_attestation_exits
assert
variable
32
import inspect import pytest import desloppify.app.commands.resolve.apply as resolve_apply_mod import desloppify.app.commands.resolve.cmd as resolve_mod import desloppify.app.commands.resolve.selection as resolve_selection_mod import desloppify.cli as cli_mod import desloppify.intelligence.narrative as narrative_mod ...
out
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/tests/commands/test_cmd_scan.py
test_all_zeros
assert
variable
30
from types import SimpleNamespace import pytest import desloppify.app.commands.scan.scan as scan_cmd_mod import desloppify.intelligence.narrative as narrative_mod import desloppify.languages as lang_mod from desloppify.app.commands.scan.scan import ( _audit_excluded_dirs, _collect_codebase_metrics, _effec...
out
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/tests/commands/test_cmd_status.py
test_show_dimension_table_with_empty_dims
assert
variable
18
from desloppify.app.commands.status import ( cmd_status, show_dimension_table, show_focus_suggestion, show_ignore_summary, show_structural_areas, show_subjective_followup, ) from desloppify.app.commands.status_parts.summary import score_summary_lines class TestStatusModuleSanity: def test_...
out
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/tests/commands/test_cmd_zone.py
test_unknown_action_prints_usage
assert
variable
22
import desloppify.core.config as config_mod from desloppify.app.commands.helpers.runtime import CommandRuntime from desloppify.app.commands.zone_cmd import ( _zone_clear, _zone_set, _zone_show, cmd_zone, ) class TestCmdZoneDispatch: def test_unknown_action_prints_usage(self, capsys): impor...
err
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/tests/commands/test_cmd_zone.py
test_valid_zone_value_saves
assert
variable
35
import desloppify.core.config as config_mod from desloppify.app.commands.helpers.runtime import CommandRuntime from desloppify.app.commands.zone_cmd import ( _zone_clear, _zone_set, _zone_show, cmd_zone, ) class TestZoneSet: def test_valid_zone_value_saves(self, monkeypatch, capsys): """Se...
out
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/tests/commands/test_helpers.py
test_print_agent_plan_numbered_steps
assert
variable
21
from __future__ import annotations from types import SimpleNamespace from unittest.mock import patch import pytest from desloppify.app.commands.helpers.rendering import ( print_agent_plan, print_ranked_actions, print_replacement_groups, ) from desloppify.app.commands.helpers.state import require_complete...
out
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/csharp/tests/test_csharp_parse_helpers.py
test_split_params_empty
assert
collection
13
from __future__ import annotations from desloppify.languages.csharp._parse_helpers import ( extract_csharp_params, extract_csharp_return_annotation, find_expression_end, find_matching_brace, split_params, ) def test_split_params_empty(): assert split_params("") ==
[]
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/go/tests/test_extractors.py
test_extract_nonexistent_file
assert
collection
20
from __future__ import annotations from pathlib import Path from unittest.mock import patch from desloppify.languages.go.extractors import ( extract_functions, extract_go_functions, normalize_go_body, ) def _write_go_file(tmp_path: Path, name: str, content: str) -> str: f = tmp_path / name f.writ...
[]
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/python/tests/test_py_coupling_contracts.py
test_ignores_mixin_with_declared_contract_or_writes
assert
collection
29
from pathlib import Path from desloppify.languages.python.detectors.coupling_contracts import ( detect_implicit_mixin_contracts, ) def _write(tmp_path: Path, rel: str, content: str) -> Path: path = tmp_path / rel path.parent.mkdir(parents=True, exist_ok=True) path.write_text(content) return path ...
[]
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/python/tests/test_py_extractors.py
test_nonexistent_file_returns_empty
assert
collection
23
import textwrap from pathlib import Path from desloppify.languages.python.extractors import ( detect_passthrough_functions, extract_py_classes, extract_py_functions, extract_py_params, normalize_py_body, ) def _write_py(tmp_path: Path, code: str, filename: str = "test_mod.py") -> str: """Write...
[]
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/python/tests/test_py_facade.py
test_non_facade_file_not_detected
assert
collection
25
from __future__ import annotations from desloppify.languages.python.detectors.facade import ( detect_reexport_facades, is_py_facade, ) def _make_graph_entry(importer_count: int = 0) -> dict: return { "imports": set(), "importers": set(), "import_count": 0, "importer_count":...
[]
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/python/tests/test_py_private_imports.py
test_skips_test_file_private_import
assert
collection
32
from __future__ import annotations from pathlib import Path from desloppify.languages.python.detectors.private_imports import detect_private_imports def _graph_entry(*, imports: set[str] | None = None) -> dict: return { "imports": imports or set(), "importers": set(), "importer_count": 0,...
[]
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/python/tests/test_py_responsibility_cohesion.py
test_ignores_connected_module
assert
collection
33
from pathlib import Path from desloppify.languages.python.detectors.responsibility_cohesion import ( detect_responsibility_cohesion, ) def _write(tmp_path: Path, rel: str, content: str) -> Path: path = tmp_path / rel path.parent.mkdir(parents=True, exist_ok=True) path.write_text(content) return pa...
[]
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/python/tests/test_py_uncalled.py
test_called_within_same_file_not_detected
assert
collection
40
from __future__ import annotations from pathlib import Path from desloppify.languages.python.detectors.uncalled import detect_uncalled_functions from desloppify.languages.python.detectors.deps import build_dep_graph def _graph_entry(*, imports: set[str] | None = None) -> dict: return { "imports": imports...
[]
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/typescript/tests/test_ts_concerns.py
test_empty_directory
assert
collection
31
from pathlib import Path import pytest import desloppify.languages.typescript.detectors.concerns as concerns_detector_mod def _root(tmp_path, set_project_root, monkeypatch): """Point PROJECT_ROOT at the tmp directory via RuntimeContext.""" monkeypatch.setattr(concerns_detector_mod, "PROJECT_ROOT", tmp_path) ...
[]
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/typescript/tests/test_ts_deprecated.py
test_empty_directory
assert
collection
25
from pathlib import Path import pytest import desloppify.languages.typescript.detectors.deprecated as deprecated_detector_mod import desloppify.utils as utils_mod def _root(tmp_path, set_project_root, monkeypatch): """Point PROJECT_ROOT at the tmp directory via RuntimeContext.""" monkeypatch.setattr(utils_mo...
[]
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/typescript/tests/test_ts_deps.py
test_empty_directory
assert
collection
28
import json from pathlib import Path import pytest import desloppify.languages.typescript.detectors.deps as deps_detector_mod import desloppify.utils as utils_mod from desloppify.engine.detectors import orphaned as orphaned_detector_mod def _root(tmp_path, set_project_root, monkeypatch): """Point PROJECT_ROOT at...
{}
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/typescript/tests/test_ts_exports_detector.py
test_detect_dead_exports_returns_empty_when_knip_unavailable
assert
collection
18
from __future__ import annotations import json from io import StringIO from pathlib import Path from types import SimpleNamespace from unittest.mock import patch import pytest import desloppify.languages.typescript.detectors.exports as exports_mod def test_detect_dead_exports_returns_empty_when_knip_unavailable(): ...
[]
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/typescript/tests/test_ts_extractors.py
test_parse_param_names_empty
assert
collection
16
import re import textwrap from desloppify.languages.typescript.extractors import ( _extract_ts_params, _parse_param_names, extract_props, extract_ts_functions, normalize_ts_body, tsx_passthrough_pattern, ) def test_parse_param_names_empty(): """Empty string yields no params.""" assert...
[]
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/typescript/tests/test_ts_facade.py
test_non_facade_file_not_detected
assert
collection
25
from __future__ import annotations from desloppify.languages.typescript.detectors.facade import ( detect_reexport_facades, is_ts_facade, ) def _make_graph_entry(importer_count: int = 0) -> dict: return { "imports": set(), "importers": set(), "import_count": 0, "importer_cou...
[]
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/typescript/tests/test_ts_logs.py
test_empty_directory
assert
collection
23
from pathlib import Path import pytest from desloppify.languages.typescript.detectors.logs import TAG_EXTRACT_RE, detect_logs def _root(set_project_root): """Point PROJECT_ROOT at the tmp directory via RuntimeContext.""" def _write(tmp_path: Path, name: str, content: str) -> Path: p = tmp_path / name p....
[]
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/typescript/tests/test_ts_patterns.py
test_empty_directory
assert
collection
27
from pathlib import Path import pytest from desloppify.languages.typescript.detectors.patterns import ( PATTERN_FAMILIES, _build_census, detect_pattern_anomalies, ) def _root(set_project_root): """Point PROJECT_ROOT at the tmp directory via RuntimeContext.""" def _write(tmp_path: Path, name: str, co...
{}
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/typescript/tests/test_ts_patterns.py
test_empty_directory
assert
collection
27
from pathlib import Path import pytest from desloppify.languages.typescript.detectors.patterns import ( PATTERN_FAMILIES, _build_census, detect_pattern_anomalies, ) def _root(set_project_root): """Point PROJECT_ROOT at the tmp directory via RuntimeContext.""" def _write(tmp_path: Path, name: str, co...
[]
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/typescript/tests/test_ts_phases.py
test_phase_structural_uses_lang_thresholds
assert
collection
53
from __future__ import annotations from pathlib import Path from types import SimpleNamespace import desloppify.languages.typescript.phases as phases def test_phase_structural_uses_lang_thresholds(monkeypatch, tmp_path: Path): """Structural phase should honor language-configured thresholds.""" captured: dict...
[]
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/typescript/tests/test_ts_phases.py
test_phase_coupling_passes_orphaned_options
assert
collection
76
from __future__ import annotations from pathlib import Path from types import SimpleNamespace import desloppify.languages.typescript.phases as phases def test_phase_coupling_passes_orphaned_options(monkeypatch, tmp_path: Path): captured: dict[str, object] = {} monkeypatch.setattr( "desloppify.langua...
{}
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/typescript/tests/test_ts_props.py
test_empty_directory
assert
collection
25
from pathlib import Path import pytest import desloppify.languages.typescript.detectors.props as props_detector_mod from desloppify.languages.typescript.detectors.props import detect_prop_interface_bloat def _root(tmp_path, set_project_root, monkeypatch): """Point PROJECT_ROOT at the tmp directory via RuntimeCon...
[]
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/typescript/tests/test_ts_smells.py
test_clean_file_no_smells
assert
collection
34
from pathlib import Path import pytest import desloppify.languages.typescript.detectors.smells as smells_detector_mod from desloppify.languages.typescript.detectors.smells import detect_smells def _root(tmp_path, set_project_root, monkeypatch): """Point PROJECT_ROOT at the tmp directory via RuntimeContext.""" ...
[]
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/tests/commands/test_cmd_fix.py
test_empty_init
assert
collection
21
import pytest import desloppify.app.commands.fix.apply_flow as fix_apply_mod from desloppify.app.commands.fix.apply_flow import ( _SKIP_REASON_LABELS, _print_fix_retro, _print_fix_summary, _resolve_fixer_results, ) from desloppify.app.commands.fix.cmd import ( cmd_fix, ) from desloppify.languages._...
{}
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/tests/commands/test_cmd_fix.py
test_skips_already_fixed
assert
collection
41
import pytest import desloppify.app.commands.fix.apply_flow as fix_apply_mod from desloppify.app.commands.fix.apply_flow import ( _SKIP_REASON_LABELS, _print_fix_retro, _print_fix_summary, _resolve_fixer_results, ) from desloppify.app.commands.fix.cmd import ( cmd_fix, ) from desloppify.languages._...
[]
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/tests/commands/test_cmd_move.py
test_empty_list
assert
collection
20
from pathlib import Path from types import SimpleNamespace import desloppify.app.commands.move.move as move_mod from desloppify.app.commands.move.move import _cmd_move_dir from desloppify.app.commands.move.move_language import ( detect_lang_from_dir, detect_lang_from_ext, resolve_lang_for_file_move, re...
[]
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/tests/commands/test_cmd_next.py
test_tier_navigator_always_printed
assert
collection
87
from __future__ import annotations import inspect from types import SimpleNamespace import desloppify.intelligence.narrative as narrative_mod import desloppify.utils as utils_mod from desloppify.app.commands import next as next_mod from desloppify.app.commands.helpers.runtime import CommandRuntime from desloppify.app...
[]
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/tests/commands/test_cmd_scan.py
test_empty_exclusions
assert
collection
28
from types import SimpleNamespace import pytest import desloppify.app.commands.scan.scan as scan_cmd_mod import desloppify.intelligence.narrative as narrative_mod import desloppify.languages as lang_mod from desloppify.app.commands.scan.scan import ( _audit_excluded_dirs, _collect_codebase_metrics, _effec...
[]
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/tests/commands/test_direct_coverage_modules.py
test_smoke_lang_plugins
assert
collection
95
from __future__ import annotations import desloppify.app.cli_support.parser as cli_parser import desloppify.app.cli_support.parser_groups as cli_parser_groups import desloppify.app.commands.config_cmd as config_cmd import desloppify.app.commands.move.move_directory as move_directory import desloppify.app.commands.move...
{}
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/tests/commands/test_direct_coverage_modules.py
test_smoke_lang_plugins
assert
collection
96
from __future__ import annotations import desloppify.app.cli_support.parser as cli_parser import desloppify.app.cli_support.parser_groups as cli_parser_groups import desloppify.app.commands.config_cmd as config_cmd import desloppify.app.commands.move.move_directory as move_directory import desloppify.app.commands.move...
[]
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/tests/commands/test_direct_coverage_split_modules.py
test_merge_potentials_empty
assert
collection
18
from __future__ import annotations import desloppify.app.output.scorecard_parts.dimensions as scorecard_dimensions import desloppify.app.output.scorecard_parts.theme as scorecard_theme import desloppify.engine._scoring.detection as scoring_detection import desloppify.engine._scoring.policy.core as scoring_policy impor...
{}
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/python/tests/test_py_commands.py
test_no_empty_keys
assert
string_literal
9
from desloppify.languages.python.commands import get_detect_commands class TestGetDetectCommands: def test_no_empty_keys(self): commands = get_detect_commands() for key in commands: assert key.strip() !=
""
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/python/tests/test_py_extractors.py
test_body_hash_populated
assert
string_literal
32
import textwrap from pathlib import Path from desloppify.languages.python.extractors import ( detect_passthrough_functions, extract_py_classes, extract_py_functions, extract_py_params, normalize_py_body, ) def _write_py(tmp_path: Path, code: str, filename: str = "test_mod.py") -> str: """Write...
""
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/tests/commands/dev/test_dev_scaffold_templates_direct.py
test_build_scaffold_files_contains_expected_paths
assert
string_literal
15
from __future__ import annotations import desloppify.app.commands.dev_scaffold_templates as templates_mod def test_build_scaffold_files_contains_expected_paths(): files = templates_mod.build_scaffold_files( lang_name="ruby", class_name="RubyConfig", extensions=[".rb"], markers=["Ge...
""
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/tests/commands/test_cmd_move.py
test_does_not_use_legacy_constant
assert
string_literal
21
from pathlib import Path from types import SimpleNamespace import desloppify.app.commands.move.move as move_mod from desloppify.app.commands.move.move import _cmd_move_dir from desloppify.app.commands.move.move_language import ( detect_lang_from_dir, detect_lang_from_ext, resolve_lang_for_file_move, re...
""
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/tests/commands/test_cmd_plan.py
test_no_scan_prints_warning
assert
string_literal
31
import inspect import desloppify.engine.planning.core as plan_mod from desloppify.app.commands import plan_cmd from desloppify.app.commands.plan_cmd import cmd_plan_output class TestCmdPlanOutput: def test_no_scan_prints_warning(self, monkeypatch, capsys): """When no scan has been performed, should print...
""
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/tests/commands/test_cmd_scan.py
test_zero_delta
assert
string_literal
29
from types import SimpleNamespace import pytest import desloppify.app.commands.scan.scan as scan_cmd_mod import desloppify.intelligence.narrative as narrative_mod import desloppify.languages as lang_mod from desloppify.app.commands.scan.scan import ( _audit_excluded_dirs, _collect_codebase_metrics, _effec...
""
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/tests/commands/test_cmd_status.py
test_show_focus_suggestion_empty_dims_no_crash
assert
string_literal
18
from desloppify.app.commands.status import ( cmd_status, show_dimension_table, show_focus_suggestion, show_ignore_summary, show_structural_areas, show_subjective_followup, ) from desloppify.app.commands.status_parts.summary import score_summary_lines class TestStatusModuleSanity: def test_...
""
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/tests/commands/test_helpers.py
test_print_agent_plan_empty_steps
assert
string_literal
20
from __future__ import annotations from types import SimpleNamespace from unittest.mock import patch import pytest from desloppify.app.commands.helpers.rendering import ( print_agent_plan, print_ranked_actions, print_replacement_groups, ) from desloppify.app.commands.helpers.state import require_complete...
""
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/tests/commands/test_review_output.py
test_print_skipped_validation_details_no_skipped
assert
string_literal
20
from __future__ import annotations import json from types import SimpleNamespace from unittest.mock import MagicMock, patch import pytest from desloppify.app.commands.review import output as review_output_mod def _colorize(text: str, _style: str) -> str: """Identity colorize for testing.""" return text def...
""
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/tests/commands/test_transitive_modules.py
test_small_positive_returns_empty
assert
string_literal
20
from __future__ import annotations import argparse from unittest.mock import MagicMock, patch import pytest from desloppify.app.commands.resolve.render import ( _delta_suffix, _print_next_command, _print_resolve_summary, _print_score_movement, _print_wontfix_batch_warning, _print_subjective_r...
""
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/tests/detectors/test_base.py
test_function_info_defaults
assert
string_literal
12
from desloppify.engine.detectors.base import ( ClassInfo, ComplexitySignal, FunctionInfo, GodRule, ) def test_function_info_defaults(): """FunctionInfo optional fields have correct defaults.""" fi = FunctionInfo(name="f", file="x.py", line=1, end_line=2, loc=2, body="") assert fi.normalize...
""
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/tests/review/test_dimensions_init.py
test_normalize_empty_string
assert
string_literal
13
from __future__ import annotations from desloppify.intelligence.review.dimensions import ( DIMENSION_PROMPTS, DIMENSIONS, is_custom_dimension, is_known_dimension, normalize_dimension_name, ) def test_normalize_empty_string(): assert normalize_dimension_name("") ==
""
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/typescript/tests/test_ts_exports_detector.py
test_cmd_exports_table_output
assert
string_literal
40
from __future__ import annotations import json from io import StringIO from pathlib import Path from types import SimpleNamespace from unittest.mock import patch import pytest import desloppify.languages.typescript.detectors.exports as exports_mod def _make_args(path: str = "/tmp/fake", json_output: bool = False, t...
"2"
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/typescript/tests/test_ts_unused.py
test_ts6133_matches
assert
string_literal
33
from pathlib import Path import pytest import desloppify.languages.typescript.detectors.unused as ts_unused_mod from desloppify.languages.typescript.detectors.unused import ( TS6133_RE, TS6192_RE, _categorize_unused, detect_unused, ) def _root(tmp_path, set_project_root, monkeypatch): """Point PR...
"7"
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/typescript/tests/test_ts_unused.py
test_ts6192_matches
assert
string_literal
33
from pathlib import Path import pytest import desloppify.languages.typescript.detectors.unused as ts_unused_mod from desloppify.languages.typescript.detectors.unused import ( TS6133_RE, TS6192_RE, _categorize_unused, detect_unused, ) def _root(tmp_path, set_project_root, monkeypatch): """Point PR...
"1"
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/tests/review/test_issues.py
test_low_impact
assert
string_literal
108
from __future__ import annotations import argparse from datetime import datetime, timedelta, timezone from unittest.mock import patch from desloppify.app.commands.helpers.runtime import CommandRuntime from desloppify.app.commands.issues_cmd import ( _list_issues, _show_issue, _update_issue, cmd_issues...
"+"
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/go/tests/test_init.py
test_config_name
assert
string_literal
10
from __future__ import annotations from desloppify.engine.policy.zones import FileZoneMap, Zone from desloppify.hook_registry import get_lang_hook from desloppify.languages import get_lang def test_config_name(): cfg = get_lang("go") assert cfg.name ==
"go"
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/python/tests/test_py_move.py
test_compute_py_relative_import
assert
string_literal
14
from __future__ import annotations from pathlib import Path import desloppify.languages.python.move as py_move class TestMovePyHelpers: def test_compute_py_relative_import(self): result = py_move._compute_py_relative_import( "/project/pkg/a.py", "/project/pkg/b.py" ) assert ...
".b"
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/typescript/tests/test_ts_unused.py
test_ts6133_matches
assert
string_literal
32
from pathlib import Path import pytest import desloppify.languages.typescript.detectors.unused as ts_unused_mod from desloppify.languages.typescript.detectors.unused import ( TS6133_RE, TS6192_RE, _categorize_unused, detect_unused, ) def _root(tmp_path, set_project_root, monkeypatch): """Point PR...
"15"
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/go/tests/test_extractors.py
test_extract_generics
assert
string_literal
36
from __future__ import annotations from pathlib import Path from unittest.mock import patch from desloppify.languages.go.extractors import ( extract_functions, extract_go_functions, normalize_go_body, ) def _write_go_file(tmp_path: Path, name: str, content: str) -> str: f = tmp_path / name f.writ...
"Map"
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/python/tests/test_py_move.py
test_path_to_py_module
assert
string_literal
12
from __future__ import annotations from pathlib import Path import desloppify.languages.python.move as py_move class TestMovePyHelpers: def test_path_to_py_module(self): root = Path("/project") assert py_move._path_to_py_module("/project/foo/bar.py", root) == "foo.bar" assert py_move._pa...
"foo"
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/python/tests/test_py_move.py
test_compute_py_relative_import_parent
assert
string_literal
14
from __future__ import annotations from pathlib import Path import desloppify.languages.python.move as py_move class TestMovePyHelpers: def test_compute_py_relative_import_parent(self): result = py_move._compute_py_relative_import( "/project/pkg/sub/a.py", "/project/pkg/b.py" ) ...
"..b"
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/typescript/tests/test_ts_extractors.py
test_extract_arrow_function
assert
string_literal
28
import re import textwrap from desloppify.languages.typescript.extractors import ( _extract_ts_params, _parse_param_names, extract_props, extract_ts_functions, normalize_ts_body, tsx_passthrough_pattern, ) def test_extract_arrow_function(tmp_path): """Arrow function assigned to const is ex...
"add"
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/typescript/tests/test_ts_init.py
test_config_default_src
assert
string_literal
7
from desloppify.languages.typescript import TypeScriptConfig def test_config_default_src(): """TypeScriptConfig.default_src is 'src'.""" cfg = TypeScriptConfig() assert cfg.default_src ==
"src"
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/typescript/tests/test_ts_move.py
test_strip_ts_ext
assert
string_literal
8
from __future__ import annotations import desloppify.languages.typescript.move as ts_move class TestMoveTsHelpers: def test_strip_ts_ext(self): assert ts_move._strip_ts_ext("foo.ts") ==
"foo"
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/typescript/tests/test_ts_move.py
test_compute_ts_specifiers_relative
assert
string_literal
12
from __future__ import annotations import desloppify.languages.typescript.move as ts_move class TestMoveTsHelpers: def test_compute_ts_specifiers_relative(self): alias, relative = ts_move._compute_ts_specifiers( "/project/src/a.ts", "/project/src/b.ts" ) assert relative ==
"./b"
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/tests/lang/csharp/test_csharp_scan.py
test_csharp_actionability_gate_downgrades_without_corroboration
assert
string_literal
43
import json import shutil from collections import Counter from pathlib import Path from types import SimpleNamespace from desloppify.engine.planning.core import generate_findings from desloppify.engine.planning.scan import PlanScanOptions from desloppify.languages.csharp import CSharpConfig from desloppify.languages.c...
"low"
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/typescript/tests/test_ts_patterns.py
test_fragmentation_detected_with_enough_areas
assert
complex_expr
51
from pathlib import Path import pytest from desloppify.languages.typescript.detectors.patterns import ( PATTERN_FAMILIES, _build_census, detect_pattern_anomalies, ) def _root(set_project_root): """Point PROJECT_ROOT at the tmp directory via RuntimeContext.""" def _write(tmp_path: Path, name: str, co...
frag[0]
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/tests/lang/common/test_lang_resolution_direct.py
test_available_langs_returns_sorted_list
assert
complex_expr
19
from __future__ import annotations from types import SimpleNamespace import pytest import desloppify.languages._framework.registry_state as registry_state import desloppify.languages._framework.resolution as lang_resolution_mod def test_available_langs_returns_sorted_list(monkeypatch): monkeypatch.setattr( ...
langs[1]
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/go/tests/test_init.py
test_go_test_files_classified_as_test_zone
assert
complex_expr
16
from __future__ import annotations from desloppify.engine.policy.zones import FileZoneMap, Zone from desloppify.hook_registry import get_lang_hook from desloppify.languages import get_lang def test_go_test_files_classified_as_test_zone(): cfg = get_lang("go") zone_map = FileZoneMap( ["pkg/foo.go", "pk...
Zone.TEST
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/typescript/tests/test_ts_exports_detector.py
test_cmd_exports_table_output
assert
complex_expr
41
from __future__ import annotations import json from io import StringIO from pathlib import Path from types import SimpleNamespace from unittest.mock import patch import pytest import desloppify.languages.typescript.detectors.exports as exports_mod def _make_args(path: str = "/tmp/fake", json_output: bool = False, t...
rows[0][2]
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/typescript/tests/test_ts_init.py
test_config_fixers_dict
assert
complex_expr
8
from desloppify.languages.typescript import TypeScriptConfig def test_config_fixers_dict(): """TypeScriptConfig.fixers is a dict with at least 'unused-imports'.""" cfg = TypeScriptConfig() assert isinstance(cfg.fixers, dict) assert "unused-imports" in
cfg.fixers
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/tests/ci/test_ci_contracts.py
test_ci_plan_required_checks_match_ci_workflow
assert
complex_expr
53
from __future__ import annotations import re from pathlib import Path import pytest yaml = pytest.importorskip("yaml") REPO_ROOT = Path(__file__).resolve().parents[3] CI_WORKFLOW = REPO_ROOT / ".github" / "workflows" / "ci.yml" INTEGRATION_WORKFLOW = REPO_ROOT / ".github" / "workflows" / "integration.yml" PUBLISH_W...
ci["jobs"]
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/tests/detectors/test_single_use.py
test_file_with_one_importer_detected
assert
complex_expr
28
from desloppify.engine.detectors.single_use import detect_single_use_abstractions def _make_graph_entry(importers: set[str]) -> dict: return { "imports": set(), "importers": importers, "import_count": 0, "importer_count": len(importers), } class TestDetectSingleUseAbstractions:...
entries[0]
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/go/tests/test_init.py
test_go_vendor_classified_as_vendor
assert
complex_expr
15
from __future__ import annotations from desloppify.engine.policy.zones import FileZoneMap, Zone from desloppify.hook_registry import get_lang_hook from desloppify.languages import get_lang def test_go_vendor_classified_as_vendor(): cfg = get_lang("go") zone_map = FileZoneMap( ["pkg/foo.go", "vendor/li...
Zone.VENDOR
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/tests/core/test_core_direct.py
test_log_best_effort_failure_debugs
assert
complex_expr
18
from __future__ import annotations import json import logging import desloppify.core.fallbacks as fallbacks_mod import desloppify.core.query as query_mod def test_log_best_effort_failure_debugs(caplog): logger = logging.getLogger("desloppify.tests.core_direct") with caplog.at_level(logging.DEBUG, logger=log...
caplog.text
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/tests/commands/test_commands_base.py
test_no_entries_prints_green
assert
complex_expr
33
import json from types import SimpleNamespace from unittest.mock import MagicMock, patch from desloppify.languages._framework.commands_base import ( make_cmd_complexity, make_cmd_facade, make_cmd_large, make_cmd_naming, make_cmd_passthrough, make_cmd_single_use, make_cmd_smells, ) def _mak...
captured.out
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/go/tests/test_init.py
test_config_extensions
assert
complex_expr
10
from __future__ import annotations from desloppify.engine.policy.zones import FileZoneMap, Zone from desloppify.hook_registry import get_lang_hook from desloppify.languages import get_lang def test_config_extensions(): cfg = get_lang("go") assert ".go" in
cfg.extensions
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/typescript/tests/test_ts_init.py
test_config_exclusions
assert
complex_expr
7
from desloppify.languages.typescript import TypeScriptConfig def test_config_exclusions(): """TypeScriptConfig.exclusions includes node_modules and .d.ts.""" cfg = TypeScriptConfig() assert "node_modules" in
cfg.exclusions
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/go/tests/test_init.py
test_test_coverage_hooks_registered
assert
none_literal
9
from __future__ import annotations from desloppify.engine.policy.zones import FileZoneMap, Zone from desloppify.hook_registry import get_lang_hook from desloppify.languages import get_lang def test_test_coverage_hooks_registered(): assert get_lang_hook("go", "test_coverage") is not
None
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/python/tests/test_py_complexity.py
test_below_threshold_returns_none
assert
none_literal
15
import textwrap from desloppify.languages.python.detectors import complexity as complexity_mod from desloppify.languages.python.detectors.complexity import ( compute_long_functions, compute_max_params, compute_nesting_depth, ) class TestComputeMaxParams: def test_below_threshold_returns_none(self): ...
None
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/python/tests/test_py_deps.py
test_simple_relative_import
assert
none_literal
47
import textwrap from pathlib import Path from desloppify.languages.python.detectors.deps import ( build_dep_graph, find_python_dynamic_imports, ) def _make_pkg(tmp_path: Path, files: dict[str, str]) -> Path: """Create a Python package directory structure. Args: tmp_path: pytest temp directory...
None
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/python/tests/test_py_facade.py
test_pure_reexport
assert
none_literal
22
from __future__ import annotations from desloppify.languages.python.detectors.facade import ( detect_reexport_facades, is_py_facade, ) def _make_graph_entry(importer_count: int = 0) -> dict: return { "imports": set(), "importers": set(), "import_count": 0, "importer_count":...
None
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/python/tests/test_py_init.py
test_instantiation
assert
none_literal
15
from desloppify.engine.policy.zones import Zone from desloppify.languages.python import ( PY_COMPLEXITY_SIGNALS, PY_ENTRY_PATTERNS, PY_GOD_RULES, PY_SKIP_NAMES, PY_ZONE_RULES, PythonConfig, ) class TestPythonConfig: def test_instantiation(self): config = PythonConfig() asse...
None
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/python/tests/test_py_move.py
test_path_to_py_module_outside_root
assert
none_literal
12
from __future__ import annotations from pathlib import Path import desloppify.languages.python.move as py_move class TestMovePyHelpers: def test_path_to_py_module_outside_root(self): root = Path("/project") assert py_move._path_to_py_module("/other/foo.py", root) is
None
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/typescript/tests/test_ts_deprecated.py
test_returns_none_for_unresolvable
assert
none_literal
28
from pathlib import Path import pytest import desloppify.languages.typescript.detectors.deprecated as deprecated_detector_mod import desloppify.utils as utils_mod def _root(tmp_path, set_project_root, monkeypatch): """Point PROJECT_ROOT at the tmp directory via RuntimeContext.""" monkeypatch.setattr(utils_mo...
None
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/languages/typescript/tests/test_ts_deps.py
test_empty_directory
assert
func_call
30
import json from pathlib import Path import pytest import desloppify.languages.typescript.detectors.deps as deps_detector_mod import desloppify.utils as utils_mod from desloppify.engine.detectors import orphaned as orphaned_detector_mod def _root(tmp_path, set_project_root, monkeypatch): """Point PROJECT_ROOT at...
set()
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/tests/lang/gdscript/test_gdscript_deps.py
test_build_dep_graph_ignores_non_gd_paths
assert
func_call
27
from __future__ import annotations from pathlib import Path from unittest.mock import patch from desloppify.languages.gdscript.detectors.deps import build_dep_graph def _write(path: Path, relpath: str, content: str) -> Path: file_path = path / relpath file_path.parent.mkdir(parents=True, exist_ok=True) f...
set()
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/tests/scan/test_flat_dirs.py
test_dir_over_threshold_detected
assert
func_call
20
from desloppify.engine.detectors.flat_dirs import detect_flat_dirs class TestDetectFlatDirs: def test_dir_over_threshold_detected(self, tmp_path): d = tmp_path / "components" d.mkdir() files = [] for i in range(25): f = d / f"comp_{i}.tsx" f.write_text(f"expo...
str(d)
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/tests/detectors/test_large.py
test_file_over_threshold_detected
assert
func_call
15
from desloppify.engine.detectors.large import detect_large_files class TestDetectLargeFiles: def test_file_over_threshold_detected(self, tmp_path): big = tmp_path / "big.py" big.write_text("\n".join(f"line_{i} = {i}" for i in range(600))) entries, total = detect_large_files( tm...
str(big)
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/tests/commands/test_review_process_guards_direct.py
test_review_prepare_zero_files_exits_with_error
assert
func_call
52
from __future__ import annotations import json from pathlib import Path from types import SimpleNamespace import pytest from desloppify.app.commands.review.import_helpers import load_import_findings_data from desloppify.app.commands.review.prepare import do_prepare from desloppify.app.commands.review.runner_helpers ...
err.lower()
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/tests/commands/test_direct_coverage_modules.py
test_private_imports_is_dunder
assert
bool_literal
80
from __future__ import annotations import desloppify.app.cli_support.parser as cli_parser import desloppify.app.cli_support.parser_groups as cli_parser_groups import desloppify.app.commands.config_cmd as config_cmd import desloppify.app.commands.move.move_directory as move_directory import desloppify.app.commands.move...
True
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/tests/core/test_narrative_actions.py
test_non_smells_detector_always_applicable
assert
bool_literal
22
from __future__ import annotations import pytest from desloppify.state import empty_state as empty_state_factory from desloppify.intelligence.narrative.action_engine import ( _fixer_has_applicable_findings, compute_actions as _compute_actions, ) from desloppify.intelligence.narrative.action_models import Acti...
True
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/tests/core/test_plan_modules_direct.py
test_is_subjective_phase_checks_label_and_run_name
assert
bool_literal
21
from __future__ import annotations from pathlib import Path from types import SimpleNamespace import desloppify.engine.planning.common as plan_common_mod import desloppify.engine.planning.scan as plan_scan_mod import desloppify.engine.planning.select as plan_select_mod import desloppify.engine._state.filtering as fil...
True
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/tests/core/test_signal_patterns.py
test_server_only_path_api_dir
assert
bool_literal
16
from __future__ import annotations import pytest from desloppify.core.signal_patterns import ( DEPRECATION_MARKER_RE, MIGRATION_TODO_RE, SERVICE_ROLE_TOKEN_RE, SERVER_ONLY_PATH_HINTS, is_server_only_path, ) def test_server_only_path_api_dir(): """Paths containing /api/ are server-only.""" ...
True
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
peteromallet/desloppify
d497501b737bf858db5890a8585100b99f8ad565
47
train
train
desloppify/tests/core/test_utils.py
test_matches_exclusion_component_prefix
assert
bool_literal
39
import os from pathlib import Path import pytest import desloppify.core._internal.text_utils as utils_text_mod import desloppify.file_discovery as file_discovery_mod import desloppify.utils as utils_mod from desloppify.file_discovery import rel, resolve_path from desloppify.file_discovery import ( find_source_fil...
True
d497501b737bf858db5890a8585100b99f8ad565
47
v2_extractor_at_anchor
petl-developers/petl
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
train
train
petl/test/io/test_json.py
test_tojson
assert
numeric_literal
20
from __future__ import absolute_import, print_function, division from tempfile import NamedTemporaryFile import json from petl.test.helpers import ieq from petl.io.json import fromjson, fromdicts, tojson, tojsonarrays def test_tojson(): # exercise function table = (('foo', 'bar'), ('a', 1), ...
3
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
v2_extractor_at_anchor
petl-developers/petl
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
train
train
petl/test/io/test_json.py
test_tojson
assert
numeric_literal
22
from __future__ import absolute_import, print_function, division from tempfile import NamedTemporaryFile import json from petl.test.helpers import ieq from petl.io.json import fromjson, fromdicts, tojson, tojsonarrays def test_tojson(): # exercise function table = (('foo', 'bar'), ('a', 1), ...
1
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
v2_extractor_at_anchor
petl-developers/petl
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
train
train
petl/test/io/test_json.py
test_tojson
assert
numeric_literal
24
from __future__ import absolute_import, print_function, division from tempfile import NamedTemporaryFile import json from petl.test.helpers import ieq from petl.io.json import fromjson, fromdicts, tojson, tojsonarrays def test_tojson(): # exercise function table = (('foo', 'bar'), ('a', 1), ...
2
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
v2_extractor_at_anchor
petl-developers/petl
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
train
train
petl/test/io/test_json.py
test_tojson
assert
string_literal
21
from __future__ import absolute_import, print_function, division from tempfile import NamedTemporaryFile import json from petl.test.helpers import ieq from petl.io.json import fromjson, fromdicts, tojson, tojsonarrays def test_tojson(): # exercise function table = (('foo', 'bar'), ('a', 1), ...
'a'
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
v2_extractor_at_anchor
petl-developers/petl
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
train
train
petl/test/io/test_json_unicode.py
test_json_unicode
assert
numeric_literal
22
from __future__ import absolute_import, print_function, division import json from tempfile import NamedTemporaryFile from petl.test.helpers import ieq from petl.io.json import tojson, fromjson def test_json_unicode(): tbl = ((u'id', u'name'), (1, u'Արամ Խաչատրյան'), (2, u'Johann Strauß'), ...
4
3849b701e3951c110d44b7691ddabd69b4c7a0f2
198
v2_extractor_at_anchor