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
se2p/pynguin
bd24bf88e45e092362e997590382b0b653f0889b
799
train
train
tests/instrumentation/test_ast_info.py
test_ast_info_from_covered_function_only_cover
assert
collection
51
import importlib.util from pathlib import Path import pytest from pynguin.configuration import ToCoverConfiguration from pynguin.instrumentation.transformer import ModuleAstInfo def get_module_path(module_name: str, extension: str = ".py") -> str: """Return absolute path to a module. It requires the module...
{8}
bd24bf88e45e092362e997590382b0b653f0889b
799
v2_extractor_at_anchor
se2p/pynguin
bd24bf88e45e092362e997590382b0b653f0889b
799
train
train
tests/instrumentation/test_tracer.py
test_default_branchless_code_object
assert
collection
24
import threading from decimal import Decimal from math import inf from unittest.mock import MagicMock import pytest import pynguin.utils.typetracing as tt from pynguin.instrumentation import PynguinCompare from pynguin.instrumentation.tracer import CodeObjectMetaData from pynguin.instrumentation.tracer import Execu...
{0}
bd24bf88e45e092362e997590382b0b653f0889b
799
v2_extractor_at_anchor
se2p/pynguin
bd24bf88e45e092362e997590382b0b653f0889b
799
train
train
tests/instrumentation/test_tracer.py
test_no_branchless_code_object_register_multiple
assert
collection
27
import threading from decimal import Decimal from math import inf from unittest.mock import MagicMock import pytest import pynguin.utils.typetracing as tt from pynguin.instrumentation import PynguinCompare from pynguin.instrumentation.tracer import CodeObjectMetaData from pynguin.instrumentation.tracer import Execu...
{1}
bd24bf88e45e092362e997590382b0b653f0889b
799
v2_extractor_at_anchor
se2p/pynguin
bd24bf88e45e092362e997590382b0b653f0889b
799
train
train
tests/testcase/test_defaulttestcase.py
test_remove_with_dependencies
assert
collection
121
from unittest.mock import MagicMock import pytest import pynguin.assertion.assertion as ass import pynguin.testcase.defaulttestcase as dtc import pynguin.testcase.statement as st import pynguin.testcase.variablereference as vr from pynguin.analyses.module import ModuleTestCluster from pynguin.analyses.typesystem imp...
[1]
bd24bf88e45e092362e997590382b0b653f0889b
799
v2_extractor_at_anchor
se2p/pynguin
bd24bf88e45e092362e997590382b0b653f0889b
799
train
train
tests/instrumentation/test_ast_info.py
test_ast_info_from_covered_function_no_cover
assert
collection
52
import importlib.util from pathlib import Path import pytest from pynguin.configuration import ToCoverConfiguration from pynguin.instrumentation.transformer import ModuleAstInfo def get_module_path(module_name: str, extension: str = ".py") -> str: """Return absolute path to a module. It requires the module...
{27}
bd24bf88e45e092362e997590382b0b653f0889b
799
v2_extractor_at_anchor
se2p/pynguin
bd24bf88e45e092362e997590382b0b653f0889b
799
train
train
tests/ga/algorithms/test_generationalgorithm.py
test_add_search_observer
assert
collection
12
from unittest.mock import MagicMock from pynguin.ga import chromosome as chrom from pynguin.ga.algorithms.generationalgorithm import GenerationAlgorithm from pynguin.ga.stoppingcondition import MaxStatementExecutionsStoppingCondition def test_add_search_observer(): strategy = DummyAlgorithm() obs = MagicMock(...
[obs]
bd24bf88e45e092362e997590382b0b653f0889b
799
v2_extractor_at_anchor
se2p/pynguin
bd24bf88e45e092362e997590382b0b653f0889b
799
train
train
tests/large_language_model/parsing/test_astscoping.py
test_free_variable_operator_get_comprehension_bound_vars
assert
collection
39
import ast from unittest.mock import MagicMock from unittest.mock import patch import pytest import pynguin.testcase.variablereference as vr from pynguin.large_language_model.parsing.astscoping import FreeVariableOperator from pynguin.large_language_model.parsing.astscoping import VariableRefAST from pynguin.large_...
["x"]
bd24bf88e45e092362e997590382b0b653f0889b
799
v2_extractor_at_anchor
se2p/pynguin
bd24bf88e45e092362e997590382b0b653f0889b
799
train
train
tests/large_language_model/test_rewriter.py
test_stmt_rewriter_bound_scope_methods
assert
collection
18
import ast import pytest from pynguin.large_language_model.parsing import rewriter def test_stmt_rewriter_bound_scope_methods(): """Test the enter_new_bound_scope and exit_bound_scope methods.""" visitor = rewriter.StmtRewriter() # Initial state visitor._bound_variables = {"x"} visitor.replace_o...
{"x"}
bd24bf88e45e092362e997590382b0b653f0889b
799
v2_extractor_at_anchor
se2p/pynguin
bd24bf88e45e092362e997590382b0b653f0889b
799
train
train
tests/instrumentation/test_programgraph.py
test_get_predecessors
assert
collection
36
from unittest.mock import MagicMock import pytest from bytecode.cfg import BasicBlock from pynguin.instrumentation.controlflow import BasicBlockNode from pynguin.instrumentation.controlflow import ProgramGraph def mock_basic_block() -> BasicBlock: mock = MagicMock(BasicBlock) mock.__len__.side_effect = lamb...
{node}
bd24bf88e45e092362e997590382b0b653f0889b
799
v2_extractor_at_anchor
se2p/pynguin
bd24bf88e45e092362e997590382b0b653f0889b
799
train
train
tests/analyses/test_syntaxtree.py
test_get_function_description_nested
assert
bool_literal
38
import ast import importlib import inspect import logging import astroid import pytest from pynguin.analyses import syntaxtree from pynguin.analyses.syntaxtree import FunctionAnalysisVisitor from pynguin.analyses.syntaxtree import astroid_to_ast from pynguin.analyses.syntaxtree import get_class_node_from_ast from pyn...
True
bd24bf88e45e092362e997590382b0b653f0889b
799
v2_extractor_at_anchor
se2p/pynguin
bd24bf88e45e092362e997590382b0b653f0889b
799
train
train
tests/analyses/test_typesystem.py
test_is_subtype_string_subtype
assert
bool_literal
100
import inspect import operator import re from typing import Any from typing import TypeVar from typing import Union from unittest import mock import pytest import pynguin.configuration as config from pynguin.analyses.module import generate_test_cluster from pynguin.analyses.typesystem import _DICT_KEY_ATTRIBUTES fr...
True
bd24bf88e45e092362e997590382b0b653f0889b
799
v2_extractor_at_anchor
se2p/pynguin
bd24bf88e45e092362e997590382b0b653f0889b
799
train
train
tests/ga/test_coveragegoals.py
test_non_root_branch_coverage_goal
assert
bool_literal
41
from __future__ import annotations import ast import importlib from typing import TYPE_CHECKING from unittest import mock from unittest.mock import MagicMock import pytest import pynguin.ga.coveragegoals as bg import pynguin.ga.testcasechromosome as tcc import pynguin.testcase.defaulttestcase as dtc import pynguin....
True
bd24bf88e45e092362e997590382b0b653f0889b
799
v2_extractor_at_anchor
se2p/pynguin
bd24bf88e45e092362e997590382b0b653f0889b
799
train
train
tests/large_language_model/parsing/test_astscoping.py
test_variable_ref_ast_is_call
assert
bool_literal
34
import ast from unittest.mock import MagicMock from unittest.mock import patch import pytest import pynguin.testcase.variablereference as vr from pynguin.large_language_model.parsing.astscoping import FreeVariableOperator from pynguin.large_language_model.parsing.astscoping import VariableRefAST from pynguin.large_...
True
bd24bf88e45e092362e997590382b0b653f0889b
799
v2_extractor_at_anchor
se2p/pynguin
bd24bf88e45e092362e997590382b0b653f0889b
799
train
train
tests/large_language_model/parsing/test_helpers.py
test_key_in_dict_with_boolean_true
assert
bool_literal
47
import ast from unittest.mock import MagicMock from unittest.mock import patch import pynguin.testcase.testcase as tc from pynguin.large_language_model.parsing.helpers import add_line_numbers from pynguin.large_language_model.parsing.helpers import has_bound_variables from pynguin.large_language_model.parsing.helper...
True
bd24bf88e45e092362e997590382b0b653f0889b
799
v2_extractor_at_anchor
se2p/pynguin
bd24bf88e45e092362e997590382b0b653f0889b
799
train
train
tests/slicer/test_statementslicer.py
test_testsuite_statement_checked_coverage_calculation
pytest.approx
complex_expr
66
import ast import importlib import inspect from unittest.mock import MagicMock import pytest import pynguin.configuration as config import pynguin.ga.testcasechromosome as tcc import pynguin.ga.testsuitechromosome as tsc from pynguin.analyses.constants import EmptyConstantProvider from pynguin.analyses.module impor...
4 / 8)
bd24bf88e45e092362e997590382b0b653f0889b
799
v2_extractor_at_anchor
se2p/pynguin
bd24bf88e45e092362e997590382b0b653f0889b
799
train
train
tests/slicer/test_statementslicer.py
test_only_void_function
pytest.approx
complex_expr
104
import ast import importlib import inspect from unittest.mock import MagicMock import pytest import pynguin.configuration as config import pynguin.ga.testcasechromosome as tcc import pynguin.ga.testsuitechromosome as tsc from pynguin.analyses.constants import EmptyConstantProvider from pynguin.analyses.module impor...
3 / 6)
bd24bf88e45e092362e997590382b0b653f0889b
799
v2_extractor_at_anchor
se2p/pynguin
bd24bf88e45e092362e997590382b0b653f0889b
799
train
train
tests/slicer/test_statementslicer.py
test_getter_before_setter
pytest.approx
complex_expr
146
import ast import importlib import inspect from unittest.mock import MagicMock import pytest import pynguin.configuration as config import pynguin.ga.testcasechromosome as tcc import pynguin.ga.testsuitechromosome as tsc from pynguin.analyses.constants import EmptyConstantProvider from pynguin.analyses.module impor...
5 / 6)
bd24bf88e45e092362e997590382b0b653f0889b
799
v2_extractor_at_anchor
se2p/pynguin
bd24bf88e45e092362e997590382b0b653f0889b
799
train
train
tests/ga/algorithms/test_llmosalgorithm.py
test_calculate_gao_coverage_map
assert
complex_expr
154
from unittest.mock import MagicMock from unittest.mock import patch import pytest import pynguin.ga.testcasechromosome as tcc import pynguin.ga.testsuitechromosome as tsc import pynguin.utils.statistics.stats as stat from pynguin.ga.algorithms.llmosalgorithm import LLMOSAAlgorithm from pynguin.large_language_model.l...
12 / 24
bd24bf88e45e092362e997590382b0b653f0889b
799
v2_extractor_at_anchor
se2p/pynguin
bd24bf88e45e092362e997590382b0b653f0889b
799
train
train
tests/large_language_model/helpers/test_testcasereferencecopier.py
test_create_new_assertion_float_assertion
assert
complex_expr
47
import ast import math from unittest.mock import MagicMock import pytest import pynguin.large_language_model.helpers.testcasereferencecopier as trc import pynguin.testcase.testcase as tc import pynguin.testcase.variablereference as vr from pynguin.assertion.assertion import FloatAssertion from pynguin.assertion.ass...
math.pi
bd24bf88e45e092362e997590382b0b653f0889b
799
v2_extractor_at_anchor
se2p/pynguin
bd24bf88e45e092362e997590382b0b653f0889b
799
train
train
tests/large_language_model/test_rewriter.py
test_visit_aug_assign
assert
complex_expr
39
import ast import pytest from pynguin.large_language_model.parsing import rewriter def test_visit_aug_assign(): """Test the visit_AugAssign method.""" visitor = rewriter.StmtRewriter() # Test with augmented assignment (lines 362-363, 366) target = ast.Name(id="x", ctx=ast.Store()) op = ast.Add()...
target.id
bd24bf88e45e092362e997590382b0b653f0889b
799
v2_extractor_at_anchor
se2p/pynguin
bd24bf88e45e092362e997590382b0b653f0889b
799
train
train
tests/utils/test_controlflowdistance.py
test_increase_approach_level
assert
complex_expr
24
import math from unittest.mock import MagicMock import hypothesis.strategies as st import pytest from hypothesis import given from pynguin.instrumentation.tracer import ExecutionTrace from pynguin.instrumentation.tracer import SubjectProperties from pynguin.testcase.execution import ExecutionResult from pynguin.uti...
level + 1
bd24bf88e45e092362e997590382b0b653f0889b
799
v2_extractor_at_anchor
se2p/pynguin
bd24bf88e45e092362e997590382b0b653f0889b
799
train
train
tests/assertion/test_assertion_trace.py
test_clone
assert
complex_expr
18
from unittest.mock import MagicMock import pytest import pynguin.assertion.assertion_trace as at from pynguin.utils.orderedset import OrderedSet def assertion_trace(): return at.AssertionTrace() def test_clone(assertion_trace): entry = MagicMock() assertion_trace.add_entry(1337, entry) clone = asse...
clone.trace
bd24bf88e45e092362e997590382b0b653f0889b
799
v2_extractor_at_anchor
se2p/pynguin
bd24bf88e45e092362e997590382b0b653f0889b
799
train
train
tests/testcase/execution/test_subprocesstestcaseexecutor.py
test_subprocess_exception_logging
assert
complex_expr
80
import importlib import inspect import logging import multiprocessing.connection as mp_conn import os import signal import unittest.mock from typing import Any from unittest.mock import patch import pytest import pynguin.configuration as config import pynguin.testcase.defaulttestcase as dtc import pynguin.testcase.s...
caplog.text
bd24bf88e45e092362e997590382b0b653f0889b
799
v2_extractor_at_anchor
se2p/pynguin
bd24bf88e45e092362e997590382b0b653f0889b
799
train
train
tests/test_cli.py
test__setup_logging_single_verbose_without_log_file
assert
complex_expr
30
import argparse import importlib import logging import os import re from pathlib import Path from unittest import mock from unittest.mock import MagicMock from unittest.mock import call import pytest import pynguin.configuration as config from pynguin.cli import _DANGER_ENV # noqa: PLC2701 from pynguin.cli import ...
logging.INFO
bd24bf88e45e092362e997590382b0b653f0889b
799
v2_extractor_at_anchor
se2p/pynguin
bd24bf88e45e092362e997590382b0b653f0889b
799
train
train
tests/utils/stats/test_statisticsbackend.py
test_write_data_console_backend
assert
complex_expr
19
from pathlib import Path from unittest.mock import MagicMock import pynguin.configuration as config from pynguin.utils.statistics.statisticsbackend import ConsoleStatisticsBackend from pynguin.utils.statistics.statisticsbackend import CSVStatisticsBackend from pynguin.utils.statistics.statisticsbackend import OutputV...
captured.out
bd24bf88e45e092362e997590382b0b653f0889b
799
v2_extractor_at_anchor
se2p/pynguin
bd24bf88e45e092362e997590382b0b653f0889b
799
train
train
tests/instrumentation/test_version.py
test_argument_less_opcodes
assert
complex_expr
28
import dis import sys from itertools import starmap from unittest.mock import MagicMock import pytest from bytecode import Bytecode from pynguin.instrumentation.version import stack_effects from pynguin.instrumentation.version.common import InstrumentationConstantLoad from pynguin.instrumentation.version.common imp...
pushes - pops
bd24bf88e45e092362e997590382b0b653f0889b
799
v2_extractor_at_anchor
se2p/pynguin
bd24bf88e45e092362e997590382b0b653f0889b
799
train
train
tests/test_cli.py
test__setup_logging_double_verbose_without_log_file
assert
complex_expr
30
import argparse import importlib import logging import os import re from pathlib import Path from unittest import mock from unittest.mock import MagicMock from unittest.mock import call import pytest import pynguin.configuration as config from pynguin.cli import _DANGER_ENV # noqa: PLC2701 from pynguin.cli import ...
logging.DEBUG
bd24bf88e45e092362e997590382b0b653f0889b
799
v2_extractor_at_anchor
shakedzy/dython
2a1de105760cde981769918ff2240fbec3818820
9
train
train
tests/test_data_utils/test_one_hot_encode.py
test_one_hot_encode_check
assert
collection
11
import pytest from dython.data_utils import one_hot_encode def test_one_hot_encode_check(): lst = [0, 0, 2, 5] row = len(lst) col = max(lst) + 1 result = one_hot_encode(lst) assert result.shape ==
(row, col)
2a1de105760cde981769918ff2240fbec3818820
9
v2_extractor_at_anchor
shakedzy/dython
2a1de105760cde981769918ff2240fbec3818820
9
train
train
tests/test_data_utils/test_one_hot_encode.py
test_negative_input
pytest.raises
complex_expr
8
import pytest from dython.data_utils import one_hot_encode def test_negative_input(): lst = [-1, -5, 0, 3] with pytest.raises(
ValueError, match="negative value")
2a1de105760cde981769918ff2240fbec3818820
9
v2_extractor_at_anchor
shakedzy/dython
2a1de105760cde981769918ff2240fbec3818820
9
train
train
tests/test_data_utils/test_one_hot_encode.py
test_more_than_one_dimension
pytest.raises
complex_expr
8
import pytest from dython.data_utils import one_hot_encode def test_more_than_one_dimension(): lst = [[0, 1], [2, 3]] with pytest.raises(
ValueError, match="must have only one dimension")
2a1de105760cde981769918ff2240fbec3818820
9
v2_extractor_at_anchor
shakedzy/dython
2a1de105760cde981769918ff2240fbec3818820
9
train
train
tests/test_model_utils/test_ks_abc.py
test_ks_abc_check_known_value
pytest.approx
numeric_literal
17
import pytest import numpy as np from matplotlib.axes._axes import Axes from dython.model_utils import ks_abc def y_true(): return np.array([0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1]) def y_pred(): return np.array([0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0]) def test_ks_abc_check_known_value(y_true, y_pre...
1.0)
2a1de105760cde981769918ff2240fbec3818820
9
v2_extractor_at_anchor
shakedzy/dython
2a1de105760cde981769918ff2240fbec3818820
9
train
train
tests/test_model_utils/test_ks_abc.py
test_ks_abc_check_known_value
pytest.approx
numeric_literal
18
import pytest import numpy as np from matplotlib.axes._axes import Axes from dython.model_utils import ks_abc def y_true(): return np.array([0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1]) def y_pred(): return np.array([0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0]) def test_ks_abc_check_known_value(y_true, y_pre...
0.4)
2a1de105760cde981769918ff2240fbec3818820
9
v2_extractor_at_anchor
shakedzy/dython
2a1de105760cde981769918ff2240fbec3818820
9
train
train
tests/test_model_utils/test_ks_abc.py
test_ks_abc_check_known_value
pytest.approx
numeric_literal
16
import pytest import numpy as np from matplotlib.axes._axes import Axes from dython.model_utils import ks_abc def y_true(): return np.array([0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1]) def y_pred(): return np.array([0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0]) def test_ks_abc_check_known_value(y_true, y_pre...
0.55)
2a1de105760cde981769918ff2240fbec3818820
9
v2_extractor_at_anchor
shakedzy/dython
2a1de105760cde981769918ff2240fbec3818820
9
train
train
tests/test_model_utils/test_ks_abc.py
test_ks_abc_check_types
assert
variable
18
import pytest import numpy as np from matplotlib.axes._axes import Axes from dython.model_utils import ks_abc def y_true(): return np.array([0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1]) def y_pred(): return np.array([0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0]) def test_ks_abc_check_types(y_true, y_pred): ...
result
2a1de105760cde981769918ff2240fbec3818820
9
v2_extractor_at_anchor
shakedzy/dython
2a1de105760cde981769918ff2240fbec3818820
9
train
train
tests/test_model_utils/test_ks_abc.py
test_ks_abc_check_known_value
assert
func_call
17
import pytest import numpy as np from matplotlib.axes._axes import Axes from dython.model_utils import ks_abc def y_true(): return np.array([0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1]) def y_pred(): return np.array([0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0]) def test_ks_abc_check_known_value(y_true, y_pre...
pytest.approx(1.0)
2a1de105760cde981769918ff2240fbec3818820
9
v2_extractor_at_anchor
shakedzy/dython
2a1de105760cde981769918ff2240fbec3818820
9
train
train
tests/test_model_utils/test_ks_abc.py
test_ks_abc_check_known_value
assert
func_call
18
import pytest import numpy as np from matplotlib.axes._axes import Axes from dython.model_utils import ks_abc def y_true(): return np.array([0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1]) def y_pred(): return np.array([0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0]) def test_ks_abc_check_known_value(y_true, y_pre...
pytest.approx(0.4)
2a1de105760cde981769918ff2240fbec3818820
9
v2_extractor_at_anchor
shakedzy/dython
2a1de105760cde981769918ff2240fbec3818820
9
train
train
tests/test_model_utils/test_metric_graph.py
test_metric_graph_check_types
assert
variable
18
import pytest import numpy as np from matplotlib.axes._axes import Axes from dython.model_utils import metric_graph def y_true(): return np.array([0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1]) def y_pred(): return np.array([0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0]) def test_metric_graph_check_types(y_true,...
result
2a1de105760cde981769918ff2240fbec3818820
9
v2_extractor_at_anchor
shakedzy/dython
2a1de105760cde981769918ff2240fbec3818820
9
train
train
tests/test_model_utils/test_metric_graph.py
test_metric_graph_bad_metric_parameter
pytest.raises
complex_expr
14
import pytest import numpy as np from matplotlib.axes._axes import Axes from dython.model_utils import metric_graph def y_true(): return np.array([0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1]) def y_pred(): return np.array([0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0]) def test_metric_graph_bad_metric_paramete...
ValueError, match="Invalid metric")
2a1de105760cde981769918ff2240fbec3818820
9
v2_extractor_at_anchor
shakedzy/dython
2a1de105760cde981769918ff2240fbec3818820
9
train
train
tests/test_nominal/test_associations.py
test_compute_only_ax_is_none
assert
none_literal
15
import pytest import pandas as pd import numpy as np import scipy.stats as ss from sklearn import datasets from datetime import datetime, timedelta from matplotlib.axes._axes import Axes from dython.nominal import associations, correlation_ratio def test_compute_only_ax_is_none(iris_df): assoc = associations(iris...
None
2a1de105760cde981769918ff2240fbec3818820
9
v2_extractor_at_anchor
shakedzy/dython
2a1de105760cde981769918ff2240fbec3818820
9
train
train
tests/test_nominal/test_associations.py
test_return_type_check
assert
variable
16
import pytest import pandas as pd import numpy as np import scipy.stats as ss from sklearn import datasets from datetime import datetime, timedelta from matplotlib.axes._axes import Axes from dython.nominal import associations, correlation_ratio def test_return_type_check(iris_df): assoc = associations(iris_df) ...
assoc
2a1de105760cde981769918ff2240fbec3818820
9
v2_extractor_at_anchor
shakedzy/dython
2a1de105760cde981769918ff2240fbec3818820
9
train
train
tests/test_nominal/test_associations.py
test_dimension_check
assert
complex_expr
17
import pytest import pandas as pd import numpy as np import scipy.stats as ss from sklearn import datasets from datetime import datetime, timedelta from matplotlib.axes._axes import Axes from dython.nominal import associations, correlation_ratio def test_dimension_check(iris_df): corr = associations(iris_df)["cor...
corr_shape[1]
2a1de105760cde981769918ff2240fbec3818820
9
v2_extractor_at_anchor
shakedzy/dython
2a1de105760cde981769918ff2240fbec3818820
9
train
train
tests/test_nominal/test_associations.py
test_dimension_check
assert
complex_expr
18
import pytest import pandas as pd import numpy as np import scipy.stats as ss from sklearn import datasets from datetime import datetime, timedelta from matplotlib.axes._axes import Axes from dython.nominal import associations, correlation_ratio def test_dimension_check(iris_df): corr = associations(iris_df)["cor...
iris_shape[1]
2a1de105760cde981769918ff2240fbec3818820
9
v2_extractor_at_anchor
shakedzy/dython
2a1de105760cde981769918ff2240fbec3818820
9
train
train
tests/test_nominal/test_associations.py
test_mark_columns
assert
complex_expr
15
import pytest import pandas as pd import numpy as np import scipy.stats as ss from sklearn import datasets from datetime import datetime, timedelta from matplotlib.axes._axes import Axes from dython.nominal import associations, correlation_ratio def test_mark_columns(iris_df): corr = associations(iris_df, mark_co...
corr.index[0]
2a1de105760cde981769918ff2240fbec3818820
9
v2_extractor_at_anchor
shakedzy/dython
2a1de105760cde981769918ff2240fbec3818820
9
train
train
tests/test_nominal/test_associations.py
test_bad_nom_nom_assoc_parameter
pytest.raises
complex_expr
13
import pytest import pandas as pd import numpy as np import scipy.stats as ss from sklearn import datasets from datetime import datetime, timedelta from matplotlib.axes._axes import Axes from dython.nominal import associations, correlation_ratio def test_bad_nom_nom_assoc_parameter(iris_df): with pytest.raises(
ValueError, match="is not a supported")
2a1de105760cde981769918ff2240fbec3818820
9
v2_extractor_at_anchor
shakedzy/dython
2a1de105760cde981769918ff2240fbec3818820
9
train
train
tests/test_nominal/test_associations_parallel.py
test_compute_only_ax_is_none
assert
none_literal
22
import pytest import pandas as pd import scipy.stats as ss import numpy as np from psutil import cpu_count from datetime import datetime, timedelta from matplotlib.axes._axes import Axes from dython.nominal import associations, correlation_ratio MAX_CORE_COUNT = cpu_count(logical=False) def test_compute_only_ax_is_n...
None
2a1de105760cde981769918ff2240fbec3818820
9
v2_extractor_at_anchor
shakedzy/dython
2a1de105760cde981769918ff2240fbec3818820
9
train
train
tests/test_nominal/test_associations_parallel.py
test_return_type_check
assert
variable
20
import pytest import pandas as pd import scipy.stats as ss import numpy as np from psutil import cpu_count from datetime import datetime, timedelta from matplotlib.axes._axes import Axes from dython.nominal import associations, correlation_ratio MAX_CORE_COUNT = cpu_count(logical=False) def test_return_type_check(ir...
assoc
2a1de105760cde981769918ff2240fbec3818820
9
v2_extractor_at_anchor
shakedzy/dython
2a1de105760cde981769918ff2240fbec3818820
9
train
train
tests/test_nominal/test_associations_parallel.py
test_dimension_check
assert
complex_expr
21
import pytest import pandas as pd import scipy.stats as ss import numpy as np from psutil import cpu_count from datetime import datetime, timedelta from matplotlib.axes._axes import Axes from dython.nominal import associations, correlation_ratio MAX_CORE_COUNT = cpu_count(logical=False) def test_dimension_check(iris...
corr_shape[1]
2a1de105760cde981769918ff2240fbec3818820
9
v2_extractor_at_anchor
shakedzy/dython
2a1de105760cde981769918ff2240fbec3818820
9
train
train
tests/test_nominal/test_associations_parallel.py
test_dimension_check
assert
complex_expr
22
import pytest import pandas as pd import scipy.stats as ss import numpy as np from psutil import cpu_count from datetime import datetime, timedelta from matplotlib.axes._axes import Axes from dython.nominal import associations, correlation_ratio MAX_CORE_COUNT = cpu_count(logical=False) def test_dimension_check(iris...
iris_shape[1]
2a1de105760cde981769918ff2240fbec3818820
9
v2_extractor_at_anchor
shakedzy/dython
2a1de105760cde981769918ff2240fbec3818820
9
train
train
tests/test_nominal/test_associations_parallel.py
test_mark_columns
assert
complex_expr
22
import pytest import pandas as pd import scipy.stats as ss import numpy as np from psutil import cpu_count from datetime import datetime, timedelta from matplotlib.axes._axes import Axes from dython.nominal import associations, correlation_ratio MAX_CORE_COUNT = cpu_count(logical=False) def test_mark_columns(iris_df...
corr.index[0]
2a1de105760cde981769918ff2240fbec3818820
9
v2_extractor_at_anchor
shakedzy/dython
2a1de105760cde981769918ff2240fbec3818820
9
train
train
tests/test_nominal/test_associations_parallel.py
test_bad_nom_nom_assoc_parameter
pytest.raises
complex_expr
15
import pytest import pandas as pd import scipy.stats as ss import numpy as np from psutil import cpu_count from datetime import datetime, timedelta from matplotlib.axes._axes import Axes from dython.nominal import associations, correlation_ratio MAX_CORE_COUNT = cpu_count(logical=False) def test_bad_nom_nom_assoc_pa...
ValueError, match="is not a supported")
2a1de105760cde981769918ff2240fbec3818820
9
v2_extractor_at_anchor
shakedzy/dython
2a1de105760cde981769918ff2240fbec3818820
9
train
train
tests/test_nominal/test_cramers_v.py
test_cramers_v_value_range
pytest.approx
numeric_literal
28
import pytest import functools import numpy as np from hypothesis import given, strategies as st, assume, settings from dython.nominal import cramers_v approx = functools.partial(pytest.approx, abs=1e-6, rel=1e-6) def two_categorical_lists(draw): n = draw(st.integers(min_value=2, max_value=30)) categorical_l...
0.0)
2a1de105760cde981769918ff2240fbec3818820
9
v2_extractor_at_anchor
shakedzy/dython
2a1de105760cde981769918ff2240fbec3818820
9
train
train
tests/test_nominal/test_cramers_v.py
test_cramers_v_value_range
pytest.approx
numeric_literal
30
import pytest import functools import numpy as np from hypothesis import given, strategies as st, assume, settings from dython.nominal import cramers_v approx = functools.partial(pytest.approx, abs=1e-6, rel=1e-6) def two_categorical_lists(draw): n = draw(st.integers(min_value=2, max_value=30)) categorical_l...
1.0)
2a1de105760cde981769918ff2240fbec3818820
9
v2_extractor_at_anchor
shakedzy/dython
2a1de105760cde981769918ff2240fbec3818820
9
train
train
tests/test_nominal/test_cramers_v.py
test_cramers_v_symmetry
assert
func_call
28
import pytest import functools import numpy as np from hypothesis import given, strategies as st, assume, settings from dython.nominal import cramers_v approx = functools.partial(pytest.approx, abs=1e-6, rel=1e-6) def two_categorical_lists(draw): n = draw(st.integers(min_value=2, max_value=30)) categorical_l...
approx(v_yx)
2a1de105760cde981769918ff2240fbec3818820
9
v2_extractor_at_anchor
shakedzy/dython
2a1de105760cde981769918ff2240fbec3818820
9
train
train
tests/test_nominal/test_cramers_v.py
test_cramers_v_check
pytest.approx
numeric_literal
16
import pytest import functools import numpy as np from hypothesis import given, strategies as st, assume, settings from dython.nominal import cramers_v approx = functools.partial(pytest.approx, abs=1e-6, rel=1e-6) def test_cramers_v_check(iris_df): x = iris_df["extra"] y = iris_df["target"] # Note: this...
0.14201914309546954)
2a1de105760cde981769918ff2240fbec3818820
9
v2_extractor_at_anchor
shakedzy/dython
2a1de105760cde981769918ff2240fbec3818820
9
train
train
tests/test_nominal/test_cramers_v.py
test_cramers_v_check
assert
func_call
16
import pytest import functools import numpy as np from hypothesis import given, strategies as st, assume, settings from dython.nominal import cramers_v approx = functools.partial(pytest.approx, abs=1e-6, rel=1e-6) def test_cramers_v_check(iris_df): x = iris_df["extra"] y = iris_df["target"] # Note: this...
pytest.approx(0.14201914309546954)
2a1de105760cde981769918ff2240fbec3818820
9
v2_extractor_at_anchor
shakedzy/dython
2a1de105760cde981769918ff2240fbec3818820
9
train
train
tests/test_nominal/test_theils_u.py
test_theils_u_identity
pytest.approx
numeric_literal
9
import pytest from hypothesis import given, strategies as st from dython.nominal import theils_u @given(x=st.lists(categories, min_size=2, max_size=30)) def test_theils_u_identity(x): assert theils_u(x, x) == pytest.approx(
1.0)
2a1de105760cde981769918ff2240fbec3818820
9
v2_extractor_at_anchor
shakedzy/dython
2a1de105760cde981769918ff2240fbec3818820
9
train
train
tests/test_nominal/test_theils_u.py
test_theils_u_value_range
assert
variable
19
import pytest from hypothesis import given, strategies as st from dython.nominal import theils_u def two_categorical_lists(draw): n = draw(st.integers(min_value=2, max_value=30)) categorical_lists = st.lists(categories, min_size=n, max_size=n) return draw(categorical_lists), draw(categorical_lists) @giv...
u_xy
2a1de105760cde981769918ff2240fbec3818820
9
v2_extractor_at_anchor
shakedzy/dython
2a1de105760cde981769918ff2240fbec3818820
9
train
train
tests/test_nominal/test_theils_u.py
test_theils_u_identity
assert
func_call
9
import pytest from hypothesis import given, strategies as st from dython.nominal import theils_u @given(x=st.lists(categories, min_size=2, max_size=30)) def test_theils_u_identity(x): assert theils_u(x, x) ==
pytest.approx(1.0)
2a1de105760cde981769918ff2240fbec3818820
9
v2_extractor_at_anchor
shakedzy/dython
2a1de105760cde981769918ff2240fbec3818820
9
train
train
tests/test_nominal/test_theils_u.py
test_theils_u_check
pytest.approx
numeric_literal
13
import pytest from hypothesis import given, strategies as st from dython.nominal import theils_u def test_theils_u_check(iris_df): x = iris_df["extra"] y = iris_df["target"] # Note: this measure is not symmetric assert theils_u(x, y) == pytest.approx(0.02907500150218738) assert theils_u(y, x) ==...
0.0424761859049835)
2a1de105760cde981769918ff2240fbec3818820
9
v2_extractor_at_anchor
shakedzy/dython
2a1de105760cde981769918ff2240fbec3818820
9
train
train
tests/test_nominal/test_theils_u.py
test_theils_u_check
pytest.approx
numeric_literal
12
import pytest from hypothesis import given, strategies as st from dython.nominal import theils_u def test_theils_u_check(iris_df): x = iris_df["extra"] y = iris_df["target"] # Note: this measure is not symmetric assert theils_u(x, y) == pytest.approx(
0.02907500150218738)
2a1de105760cde981769918ff2240fbec3818820
9
v2_extractor_at_anchor
shakedzy/dython
2a1de105760cde981769918ff2240fbec3818820
9
train
train
tests/test_nominal/test_theils_u.py
test_theils_u_check
assert
func_call
13
import pytest from hypothesis import given, strategies as st from dython.nominal import theils_u def test_theils_u_check(iris_df): x = iris_df["extra"] y = iris_df["target"] # Note: this measure is not symmetric assert theils_u(x, y) == pytest.approx(0.02907500150218738) assert theils_u(y, x) ==...
pytest.approx(0.0424761859049835)
2a1de105760cde981769918ff2240fbec3818820
9
v2_extractor_at_anchor
shakedzy/dython
2a1de105760cde981769918ff2240fbec3818820
9
train
train
tests/test_nominal/test_theils_u.py
test_theils_u_check
assert
func_call
12
import pytest from hypothesis import given, strategies as st from dython.nominal import theils_u def test_theils_u_check(iris_df): x = iris_df["extra"] y = iris_df["target"] # Note: this measure is not symmetric assert theils_u(x, y) ==
pytest.approx(0.02907500150218738)
2a1de105760cde981769918ff2240fbec3818820
9
v2_extractor_at_anchor
shakedzy/dython
2a1de105760cde981769918ff2240fbec3818820
9
train
train
tests/test_private_helpers.py
test_replace_nan_one_nan_each
assert
complex_expr
44
import pytest import numpy as np import pandas as pd from sklearn import datasets from dython._private import ( convert, remove_incomplete_samples, replace_nan_with_value, ) pd.set_option("mode.chained_assignment", None) def iris_df(): iris = datasets.load_iris() df = pd.DataFrame(data=iris.data, ...
y_[1]
2a1de105760cde981769918ff2240fbec3818820
9
v2_extractor_at_anchor
shakedzy/dython
2a1de105760cde981769918ff2240fbec3818820
9
train
train
tests/test_private_helpers.py
test_remove_incomplete_cases_one_nan_each
assert
func_call
43
import pytest import numpy as np import pandas as pd from sklearn import datasets from dython._private import ( convert, remove_incomplete_samples, replace_nan_with_value, ) pd.set_option("mode.chained_assignment", None) def iris_df(): iris = datasets.load_iris() df = pd.DataFrame(data=iris.data, ...
len(y_)
2a1de105760cde981769918ff2240fbec3818820
9
v2_extractor_at_anchor
shakedzy/dython
2a1de105760cde981769918ff2240fbec3818820
9
train
train
tests/test_private_helpers.py
test_convert_bad_output
pytest.raises
complex_expr
32
import pytest import numpy as np import pandas as pd from sklearn import datasets from dython._private import ( convert, remove_incomplete_samples, replace_nan_with_value, ) pd.set_option("mode.chained_assignment", None) def iris_df(): iris = datasets.load_iris() df = pd.DataFrame(data=iris.data, ...
ValueError, match="Unknown")
2a1de105760cde981769918ff2240fbec3818820
9
v2_extractor_at_anchor
shakedzy/dython
2a1de105760cde981769918ff2240fbec3818820
9
train
train
tests/test_private_helpers.py
test_convert_good_output_bad_input
pytest.raises
complex_expr
33
import pytest import numpy as np import pandas as pd from sklearn import datasets from dython._private import ( convert, remove_incomplete_samples, replace_nan_with_value, ) pd.set_option("mode.chained_assignment", None) def iris_df(): iris = datasets.load_iris() df = pd.DataFrame(data=iris.data, ...
TypeError, match="cannot handle data conversion")
2a1de105760cde981769918ff2240fbec3818820
9
v2_extractor_at_anchor
shakedzy/dython
2a1de105760cde981769918ff2240fbec3818820
9
train
train
tests/test_sampling.py
test_k_none
assert
complex_expr
15
import pytest import numpy as np from dython.sampling import boltzmann_sampling, weighted_sampling def population(request): if request.param == "list": return [0.0, 1.0, 2.0, 3.0, 4.0] elif request.param == "array": return np.array([0.0, 1.0, 2.0, 3.0, 4.0]) @parametrize_sampling_funcs def tes...
np.float64
2a1de105760cde981769918ff2240fbec3818820
9
v2_extractor_at_anchor
shakedzy/dython
2a1de105760cde981769918ff2240fbec3818820
9
train
train
tests/test_sampling.py
test_k_number
assert
func_call
16
import pytest import numpy as np from dython.sampling import boltzmann_sampling, weighted_sampling def population(request): if request.param == "list": return [0.0, 1.0, 2.0, 3.0, 4.0] elif request.param == "array": return np.array([0.0, 1.0, 2.0, 3.0, 4.0]) @parametrize_sampling_funcs @pytest...
type( population )
2a1de105760cde981769918ff2240fbec3818820
9
v2_extractor_at_anchor
shotgun-sh/shotgun
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
train
train
test/integration/codebase/test_benchmark_cli.py
test_benchmark_runner_basic
assert
numeric_literal
110
from __future__ import annotations import hashlib import json import shutil from pathlib import Path import pytest from shotgun.codebase.benchmarks import ( BenchmarkRunner, MetricsDisplayOptions, MetricsExporter, get_formatter, ) from shotgun.utils.file_system_utils import get_shotgun_home def samp...
1
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
v2_extractor_at_anchor
shotgun-sh/shotgun
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
train
train
test/integration/codebase/test_benchmark_cli.py
test_benchmark_runner_basic
assert
numeric_literal
114
from __future__ import annotations import hashlib import json import shutil from pathlib import Path import pytest from shotgun.codebase.benchmarks import ( BenchmarkRunner, MetricsDisplayOptions, MetricsExporter, get_formatter, ) from shotgun.utils.file_system_utils import get_shotgun_home def samp...
0
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
v2_extractor_at_anchor
shotgun-sh/shotgun
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
train
train
test/integration/codebase/test_benchmark_cli.py
test_benchmark_runner_multiple_iterations
assert
numeric_literal
110
from __future__ import annotations import hashlib import json import shutil from pathlib import Path import pytest from shotgun.codebase.benchmarks import ( BenchmarkRunner, MetricsDisplayOptions, MetricsExporter, get_formatter, ) from shotgun.utils.file_system_utils import get_shotgun_home def samp...
2
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
v2_extractor_at_anchor
shotgun-sh/shotgun
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
train
train
test/integration/codebase/test_codebase_service.py
test_create_graph
assert
numeric_literal
16
import pytest from shotgun.codebase import CodebaseService, QueryType from shotgun.codebase.models import GraphStatus @pytest.mark.integration @pytest.mark.asyncio async def test_create_graph(service: CodebaseService, simple_python_codebase): """Test creating a graph from a codebase.""" graph = await service....
0
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
v2_extractor_at_anchor
shotgun-sh/shotgun
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
train
train
test/integration/codebase/test_codebase_service.py
test_create_graph
assert
numeric_literal
21
import pytest from shotgun.codebase import CodebaseService, QueryType from shotgun.codebase.models import GraphStatus @pytest.mark.integration @pytest.mark.asyncio async def test_create_graph(service: CodebaseService, simple_python_codebase): """Test creating a graph from a codebase.""" graph = await service....
1
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
v2_extractor_at_anchor
shotgun-sh/shotgun
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
train
train
test/integration/codebase/test_codebase_service.py
test_multiple_graphs
assert
numeric_literal
19
import pytest from shotgun.codebase import CodebaseService, QueryType from shotgun.codebase.models import GraphStatus @pytest.mark.integration @pytest.mark.asyncio async def test_multiple_graphs( service: CodebaseService, simple_python_codebase, calculator_codebase ): """Test managing multiple graphs.""" ...
2
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
v2_extractor_at_anchor
shotgun-sh/shotgun
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
train
train
test/integration/codebase/test_error_handling.py
test_worker_handles_nonexistent_file
assert
numeric_literal
32
from __future__ import annotations from pathlib import Path from unittest.mock import patch import pytest from shotgun.codebase import CodebaseService, QueryType from shotgun.codebase.core.metrics_types import ( FileParseTask, WorkBatch, ) from shotgun.codebase.core.parallel_executor import ParallelExecutor ...
1
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
v2_extractor_at_anchor
shotgun-sh/shotgun
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
train
train
test/integration/codebase/test_error_handling.py
test_worker_handles_nonexistent_file
assert
numeric_literal
34
from __future__ import annotations from pathlib import Path from unittest.mock import patch import pytest from shotgun.codebase import CodebaseService, QueryType from shotgun.codebase.core.metrics_types import ( FileParseTask, WorkBatch, ) from shotgun.codebase.core.parallel_executor import ParallelExecutor ...
0
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
v2_extractor_at_anchor
shotgun-sh/shotgun
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
train
train
test/integration/codebase/test_error_handling.py
test_sequential_fallback_produces_valid_data
assert
numeric_literal
44
from __future__ import annotations from pathlib import Path from unittest.mock import patch import pytest from shotgun.codebase import CodebaseService, QueryType from shotgun.codebase.core.metrics_types import ( FileParseTask, WorkBatch, ) from shotgun.codebase.core.parallel_executor import ParallelExecutor ...
3
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
v2_extractor_at_anchor
shotgun-sh/shotgun
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
train
train
test/integration/codebase/test_error_handling.py
test_mixed_success_failure_metrics
assert
numeric_literal
45
from __future__ import annotations from pathlib import Path from unittest.mock import patch import pytest from shotgun.codebase import CodebaseService, QueryType from shotgun.codebase.core.metrics_types import ( FileParseTask, WorkBatch, ) from shotgun.codebase.core.parallel_executor import ParallelExecutor ...
2
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
v2_extractor_at_anchor
shotgun-sh/shotgun
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
train
train
test/integration/codebase/test_error_handling.py
test_all_files_fail_gracefully
assert
numeric_literal
35
from __future__ import annotations from pathlib import Path from unittest.mock import patch import pytest from shotgun.codebase import CodebaseService, QueryType from shotgun.codebase.core.metrics_types import ( FileParseTask, WorkBatch, ) from shotgun.codebase.core.parallel_executor import ParallelExecutor ...
5
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
v2_extractor_at_anchor
shotgun-sh/shotgun
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
train
train
test/integration/codebase/test_indexer_integration.py
test_build_file_infos_creates_correct_objects
assert
numeric_literal
103
import multiprocessing import tempfile from pathlib import Path from unittest.mock import MagicMock, patch import pytest from shotgun.codebase.core.ingestor import SimpleGraphBuilder from shotgun.codebase.core.parser_loader import load_parsers from shotgun.settings import settings def sample_repo() -> Path: """C...
3
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
v2_extractor_at_anchor
shotgun-sh/shotgun
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
train
train
test/integration/codebase/test_indexer_integration.py
test_build_file_infos_creates_correct_objects
assert
numeric_literal
109
import multiprocessing import tempfile from pathlib import Path from unittest.mock import MagicMock, patch import pytest from shotgun.codebase.core.ingestor import SimpleGraphBuilder from shotgun.codebase.core.parser_loader import load_parsers from shotgun.settings import settings def sample_repo() -> Path: """C...
0
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
v2_extractor_at_anchor
shotgun-sh/shotgun
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
train
train
test/integration/codebase/test_indexer_integration.py
test_worker_count_from_env_variable
assert
numeric_literal
97
import multiprocessing import tempfile from pathlib import Path from unittest.mock import MagicMock, patch import pytest from shotgun.codebase.core.ingestor import SimpleGraphBuilder from shotgun.codebase.core.parser_loader import load_parsers from shotgun.settings import settings def sample_repo() -> Path: """C...
4
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
v2_extractor_at_anchor
shotgun-sh/shotgun
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
train
train
test/integration/codebase/test_multiplatform.py
test_worker_count_platform_independent
assert
numeric_literal
32
from __future__ import annotations import multiprocessing import os import sys import tempfile import threading import time from concurrent.futures import ThreadPoolExecutor from concurrent.futures import TimeoutError as FuturesTimeoutError from pathlib import Path import psutil import pytest from shotgun.codebase.c...
1
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
v2_extractor_at_anchor
shotgun-sh/shotgun
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
train
train
test/integration/codebase/test_multiplatform.py
test_psutil_memory_info_works
assert
numeric_literal
35
from __future__ import annotations import multiprocessing import os import sys import tempfile import threading import time from concurrent.futures import ThreadPoolExecutor from concurrent.futures import TimeoutError as FuturesTimeoutError from pathlib import Path import psutil import pytest from shotgun.codebase.c...
0
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
v2_extractor_at_anchor
shotgun-sh/shotgun
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
train
train
test/integration/codebase/test_multiplatform.py
test_parallel_executor_initialization
assert
numeric_literal
32
from __future__ import annotations import multiprocessing import os import sys import tempfile import threading import time from concurrent.futures import ThreadPoolExecutor from concurrent.futures import TimeoutError as FuturesTimeoutError from pathlib import Path import psutil import pytest from shotgun.codebase.c...
2
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
v2_extractor_at_anchor
shotgun-sh/shotgun
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
train
train
test/integration/codebase/test_multiplatform.py
test_thread_creation_works
assert
numeric_literal
45
from __future__ import annotations import multiprocessing import os import sys import tempfile import threading import time from concurrent.futures import ThreadPoolExecutor from concurrent.futures import TimeoutError as FuturesTimeoutError from pathlib import Path import psutil import pytest from shotgun.codebase.c...
4
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
v2_extractor_at_anchor
shotgun-sh/shotgun
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
train
train
test/integration/codebase/test_parallel_correctness.py
test_parallel_extracts_all_definitions
assert
numeric_literal
111
import tempfile from pathlib import Path import pytest from shotgun.codebase.core.metrics_types import ( FileInfo, FileParseTask, WorkBatch, ) from shotgun.codebase.core.parallel_executor import ParallelExecutor from shotgun.codebase.core.work_distributor import WorkDistributor from shotgun.codebase.core....
4
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
v2_extractor_at_anchor
shotgun-sh/shotgun
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
train
train
test/integration/codebase/test_parallel_correctness.py
test_parallel_extracts_all_definitions
assert
numeric_literal
113
import tempfile from pathlib import Path import pytest from shotgun.codebase.core.metrics_types import ( FileInfo, FileParseTask, WorkBatch, ) from shotgun.codebase.core.parallel_executor import ParallelExecutor from shotgun.codebase.core.work_distributor import WorkDistributor from shotgun.codebase.core....
0
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
v2_extractor_at_anchor
shotgun-sh/shotgun
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
train
train
test/integration/codebase/test_parallel_correctness.py
test_parallel_extracts_inheritance
assert
numeric_literal
120
import tempfile from pathlib import Path import pytest from shotgun.codebase.core.metrics_types import ( FileInfo, FileParseTask, WorkBatch, ) from shotgun.codebase.core.parallel_executor import ParallelExecutor from shotgun.codebase.core.work_distributor import WorkDistributor from shotgun.codebase.core....
1
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
v2_extractor_at_anchor
shotgun-sh/shotgun
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
train
train
test/integration/codebase/test_regression.py
test_codebase_index_command_works
assert
numeric_literal
27
from __future__ import annotations from pathlib import Path import pytest from shotgun.codebase import CodebaseService, QueryType from shotgun.codebase.models import GraphStatus, IndexProgress, ProgressPhase @pytest.mark.integration @pytest.mark.asyncio async def test_codebase_index_command_works( simple_python...
0
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
v2_extractor_at_anchor
shotgun-sh/shotgun
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
train
train
test/integration/codebase/test_regression.py
test_codebase_query_after_indexing
assert
numeric_literal
33
from __future__ import annotations from pathlib import Path import pytest from shotgun.codebase import CodebaseService, QueryType from shotgun.codebase.models import GraphStatus, IndexProgress, ProgressPhase @pytest.mark.integration @pytest.mark.asyncio async def test_codebase_query_after_indexing( simple_pytho...
1
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
v2_extractor_at_anchor
shotgun-sh/shotgun
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
train
train
test/integration/codebase/test_regression.py
test_sequential_mode_produces_results
assert
numeric_literal
46
from __future__ import annotations from pathlib import Path import pytest from shotgun.codebase import CodebaseService, QueryType from shotgun.codebase.models import GraphStatus, IndexProgress, ProgressPhase @pytest.mark.integration @pytest.mark.asyncio async def test_sequential_mode_produces_results( calculato...
3
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
v2_extractor_at_anchor
shotgun-sh/shotgun
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
train
train
test/integration/codebase/tools/test_codebase_shell.py
test_codebase_shell_ls_command
assert
numeric_literal
24
import pytest from pydantic_ai import RunContext from shotgun.agents.models import AgentDeps from shotgun.agents.tools.codebase import codebase_shell from shotgun.codebase.models import CodebaseGraph @pytest.mark.integration @pytest.mark.asyncio async def test_codebase_shell_ls_command( indexed_graph: CodebaseGra...
0
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
v2_extractor_at_anchor
shotgun-sh/shotgun
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
train
train
test/integration/codebase/tools/test_directory_lister.py
test_directory_lister_root_directory
assert
numeric_literal
24
import pytest from pydantic_ai import RunContext from shotgun.agents.models import AgentDeps from shotgun.agents.tools.codebase import directory_lister from shotgun.codebase.models import CodebaseGraph @pytest.mark.integration @pytest.mark.asyncio async def test_directory_lister_root_directory( indexed_graph: Cod...
0
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
v2_extractor_at_anchor
shotgun-sh/shotgun
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
train
train
test/integration/codebase/tools/test_directory_lister.py
test_directory_lister_with_pattern_python_files
assert
numeric_literal
33
import pytest from pydantic_ai import RunContext from shotgun.agents.models import AgentDeps from shotgun.agents.tools.codebase import directory_lister from shotgun.codebase.models import CodebaseGraph @pytest.mark.integration @pytest.mark.asyncio async def test_directory_lister_with_pattern_python_files( indexed...
3
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
v2_extractor_at_anchor
shotgun-sh/shotgun
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
train
train
test/integration/codebase/tools/test_directory_lister.py
test_directory_lister_with_pattern_markdown_files
assert
numeric_literal
31
import pytest from pydantic_ai import RunContext from shotgun.agents.models import AgentDeps from shotgun.agents.tools.codebase import directory_lister from shotgun.codebase.models import CodebaseGraph @pytest.mark.integration @pytest.mark.asyncio async def test_directory_lister_with_pattern_markdown_files( index...
1
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
v2_extractor_at_anchor
shotgun-sh/shotgun
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
train
train
test/integration/codebase/tools/test_directory_lister.py
test_directory_lister_file_properties
assert
numeric_literal
26
import pytest from pydantic_ai import RunContext from shotgun.agents.models import AgentDeps from shotgun.agents.tools.codebase import directory_lister from shotgun.codebase.models import CodebaseGraph @pytest.mark.integration @pytest.mark.asyncio async def test_directory_lister_file_properties( indexed_graph: Co...
2
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
v2_extractor_at_anchor
shotgun-sh/shotgun
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
train
train
test/integration/codebase/tools/test_file_read.py
test_file_read_main_file
assert
numeric_literal
24
import pytest from pydantic_ai import RunContext from shotgun.agents.models import AgentDeps from shotgun.agents.tools.codebase import file_read from shotgun.codebase.models import CodebaseGraph @pytest.mark.integration @pytest.mark.asyncio async def test_file_read_main_file( indexed_graph: CodebaseGraph, run...
0
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
v2_extractor_at_anchor
shotgun-sh/shotgun
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
train
train
test/integration/codebase/tools/test_retrieve_code.py
test_retrieve_code_class_success
assert
numeric_literal
26
import pytest from pydantic_ai import RunContext from shotgun.agents.models import AgentDeps from shotgun.agents.tools.codebase import retrieve_code from shotgun.codebase.models import CodebaseGraph @pytest.mark.integration @pytest.mark.asyncio async def test_retrieve_code_class_success( indexed_graph: CodebaseGr...
0
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
v2_extractor_at_anchor
shotgun-sh/shotgun
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
train
train
test/integration/sdk/test_sdk_codebase.py
test_index_codebase_success
assert
numeric_literal
23
import asyncio from pathlib import Path from unittest.mock import patch import pytest from shotgun.codebase.models import QueryType from shotgun.sdk import CodebaseSDK from shotgun.sdk.exceptions import CodebaseNotFoundError, InvalidPathError @pytest.mark.integration @pytest.mark.asyncio async def test_index_codebas...
0
483bbee324eef6f601c3b01f0c82ec17107c16d8
175
v2_extractor_at_anchor