repo_id
stringclasses
409 values
prefix
large_stringlengths
34
36.3k
target
large_stringlengths
1
498
assertion_type
stringclasses
31 values
difficulty
stringclasses
8 values
test_file
stringlengths
10
121
test_function
stringlengths
1
104
test_class
stringlengths
0
51
lineno
int32
2
11.3k
commit_idx
int32
drivendataorg/erdantic
import filecmp import os from pathlib import Path import sys import filetype import pytest import erdantic as erd import erdantic._version import erdantic.core import erdantic.examples from tests.snapshot_cases import SNAPSHOT_CASES as SNAPSHOT_MODEL_CASES from tests.utils import assert_dot_equals ASSETS_DIR = Path(...
expected_diagram
assert
variable
tests/test_against_assets.py
test_json_examples_against_static_assets
97
null
drivendataorg/erdantic
import erdantic as erd from erdantic.core import Cardinality, Modality from erdantic.d2 import ( _get_crowsfoot_d2, _get_visibility_prefix, _maybe_quote_value, _quote_identifier, render_d2, ) from erdantic.examples import pydantic def test_get_visibility_prefix(): """Test visibility prefix dete...
"-"
assert
string_literal
tests/test_d2.py
test_get_visibility_prefix
41
null
drivendataorg/erdantic
from pprint import pprint import sys from typing import Optional import pydantic import pytest from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.pydantic as pydantic_examples from erdantic.exceptions import UnresolvableForwardRefError from erdantic.plugins.pydantic impor...
GlobalWithFwdRefs
assert
variable
tests/test_pydantic.py
test_forward_refs_global_scope
100
null
drivendataorg/erdantic
import typing import pytest from erdantic.exceptions import _UnevaluatedForwardRefError from erdantic.typing_utils import ( get_depth1_bases, get_recursive_args, is_collection_type_of, is_nullable_type, repr_type_with_mro, ) def test_get_recursive_args(): tp = typing.Optional[typing.Dict[str,...
[SomeForwardRef]
assert
collection
tests/test_typing_utils.py
test_get_recursive_args
72
null
drivendataorg/erdantic
from pprint import pprint import sys from typing import Optional import pydantic import pydantic.v1 import pytest from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.pydantic as pydantic_examples from erdantic.exceptions import UnresolvableForwardRefError def test_forward...
"Party"
assert
string_literal
tests/test_pydantic_v1.py
test_forward_refs_global_scope
96
null
drivendataorg/erdantic
import pytest from erdantic.convenience import create, find_models from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.dataclasses as dataclasses_examples import erdantic.examples.pydantic as pydantic_examples from erdantic.exceptions import PluginNotFoundError def test_te...
ValueError)
pytest.raises
variable
tests/test_convenience.py
test_termini
75
null
drivendataorg/erdantic
from pprint import pprint from typing import Optional import msgspec import pytest from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.msgspec as msgspec_examples from erdantic.exceptions import UnresolvableForwardRefError from erdantic.plugins.msgspec import ( get_fie...
"str"
assert
string_literal
tests/test_msgspec.py
test_get_fields_from_msgspec_struct
37
null
drivendataorg/erdantic
from pprint import pprint from typing import Optional from attrs import define, resolve_types import pytest from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.attrs as attrs_examples from erdantic.exceptions import UnresolvableForwardRefError from erdantic.plugins.attrs i...
FnScopeOtherClassBefore
assert
variable
tests/test_attrs.py
test_forward_refs_fn_scope_manual_resolvable
180
null
drivendataorg/erdantic
import builtins import dataclasses import filecmp import os from pathlib import Path import sys from typing import Annotated, Any, AnyStr, List, Literal, Optional, Tuple, TypeVar import IPython.lib.pretty as IPython_pretty import pydantic import pytest import rich from erdantic.core import ( Edge, EntityRelat...
diagram2
assert
variable
tests/test_core.py
test_equality
146
null
drivendataorg/erdantic
from pprint import pprint import sys from typing import Optional import pydantic import pytest from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.pydantic as pydantic_examples from erdantic.exceptions import UnresolvableForwardRefError from erdantic.plugins.pydantic impor...
GlobalOtherModelAfter
assert
variable
tests/test_pydantic.py
test_forward_refs_global_scope
107
null
drivendataorg/erdantic
import builtins import dataclasses import filecmp import os from pathlib import Path import sys from typing import Annotated, Any, AnyStr, List, Literal, Optional, Tuple, TypeVar import IPython.lib.pretty as IPython_pretty import pydantic import pytest import rich from erdantic.core import ( Edge, EntityRelat...
model_key
assert
variable
tests/test_core.py
test_key
178
null
drivendataorg/erdantic
import builtins import dataclasses import filecmp import os from pathlib import Path import sys from typing import Annotated, Any, AnyStr, List, Literal, Optional, Tuple, TypeVar import IPython.lib.pretty as IPython_pretty import pydantic import pytest import rich from erdantic.core import ( Edge, EntityRelat...
field_key
assert
variable
tests/test_core.py
test_key
180
null
drivendataorg/erdantic
from pprint import pprint from typing import Optional from attrs import define, resolve_types import pytest from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.attrs as attrs_examples from erdantic.exceptions import UnresolvableForwardRefError from erdantic.plugins.attrs i...
4
assert
numeric_literal
tests/test_attrs.py
test_get_fields_from_attrs_class
32
null
drivendataorg/erdantic
import subprocess import sys import textwrap import pytest import erdantic.examples from erdantic.exceptions import PluginNotFoundError from erdantic.plugins import ( get_field_extractor_fn, get_predicate_fn, identify_field_extractor_fn, list_plugins, ) import erdantic.plugins.attrs import erdantic.pl...
0
assert
numeric_literal
tests/test_plugins.py
test_core_plugins
112
null
drivendataorg/erdantic
from pprint import pprint from typing import Optional import msgspec import pytest from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.msgspec as msgspec_examples from erdantic.exceptions import UnresolvableForwardRefError from erdantic.plugins.msgspec import ( get_fie...
GlobalOtherClassAfter
assert
variable
tests/test_msgspec.py
test_forward_refs_global_scope
97
null
drivendataorg/erdantic
import typing import pytest from erdantic.exceptions import _UnevaluatedForwardRefError from erdantic.typing_utils import ( get_depth1_bases, get_recursive_args, is_collection_type_of, is_nullable_type, repr_type_with_mro, ) def test_get_recursive_args(): tp = typing.Optional[typing.Dict[str,...
[str]
assert
collection
tests/test_typing_utils.py
test_get_recursive_args
45
null
drivendataorg/erdantic
import filecmp import re import subprocess import click import pytest from typer.testing import CliRunner import erdantic as erd from erdantic._version import __version__ from erdantic.cli import app, import_object_from_name import erdantic.examples.dataclasses as examples_dataclasses import erdantic.examples.pydanti...
2
assert
numeric_literal
tests/test_cli.py
test_missing_out
168
null
drivendataorg/erdantic
import erdantic as erd from erdantic.core import Cardinality, Modality from erdantic.d2 import ( _get_crowsfoot_d2, _get_visibility_prefix, _maybe_quote_value, _quote_identifier, render_d2, ) from erdantic.examples import pydantic def test_render_d2_with_source_markers(): """When source cardina...
out
assert
variable
tests/test_d2.py
test_render_d2_with_source_markers
81
null
drivendataorg/erdantic
from pprint import pprint from typing import Optional from attrs import define, resolve_types import pytest from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.attrs as attrs_examples from erdantic.exceptions import UnresolvableForwardRefError from erdantic.plugins.attrs i...
"str"
assert
string_literal
tests/test_attrs.py
test_get_fields_from_attrs_class
37
null
drivendataorg/erdantic
import builtins import dataclasses import filecmp import os from pathlib import Path import sys from typing import Annotated, Any, AnyStr, List, Literal, Optional, Tuple, TypeVar import IPython.lib.pretty as IPython_pretty import pydantic import pytest import rich from erdantic.core import ( Edge, EntityRelat...
full_name2
assert
variable
tests/test_core.py
test_fully_qualified_name_sorting
46
null
drivendataorg/erdantic
from pprint import pprint import sys from typing import Optional import pydantic import pydantic.v1 import pytest from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.pydantic as pydantic_examples from erdantic.exceptions import UnresolvableForwardRefError def test_get_fie...
4
assert
numeric_literal
tests/test_pydantic_v1.py
test_get_fields_from_pydantic_v1_model
40
null
drivendataorg/erdantic
from pprint import pprint import sys from typing import Optional import pydantic import pytest from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.pydantic as pydantic_examples from erdantic.exceptions import UnresolvableForwardRefError from erdantic.plugins.pydantic impor...
"Party"
assert
string_literal
tests/test_pydantic.py
test_forward_refs_global_scope
96
null
drivendataorg/erdantic
import builtins import dataclasses import filecmp import os from pathlib import Path import sys from typing import Annotated, Any, AnyStr, List, Literal, Optional, Tuple, TypeVar import IPython.lib.pretty as IPython_pretty import pydantic import pytest import rich from erdantic.core import ( Edge, EntityRelat...
full_name1
assert
variable
tests/test_core.py
test_fully_qualified_name_sorting
48
null
drivendataorg/erdantic
from pprint import pprint from typing import Optional from attrs import define, resolve_types import pytest from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.attrs as attrs_examples from erdantic.exceptions import UnresolvableForwardRefError from erdantic.plugins.attrs i...
"datetime"
assert
string_literal
tests/test_attrs.py
test_get_fields_from_attrs_class
41
null
drivendataorg/erdantic
import subprocess import sys import textwrap import pytest import erdantic.examples from erdantic.exceptions import PluginNotFoundError from erdantic.plugins import ( get_field_extractor_fn, get_predicate_fn, identify_field_extractor_fn, list_plugins, ) import erdantic.plugins.attrs import erdantic.pl...
list_plugins()
assert
func_call
tests/test_plugins.py
test_register_plugin
25
null
drivendataorg/erdantic
from pprint import pprint import sys from typing import Optional import pydantic import pydantic.v1 import pytest from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.pydantic as pydantic_examples from erdantic.exceptions import UnresolvableForwardRefError def test_forward...
FnScopeOtherModelBefore
assert
variable
tests/test_pydantic_v1.py
test_forward_refs_fn_scope_manual_resolvable
192
null
drivendataorg/erdantic
from pprint import pprint import sys from typing import Optional import pydantic import pydantic.v1 import pytest from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.pydantic as pydantic_examples from erdantic.exceptions import UnresolvableForwardRefError def test_forward...
FnScopeOtherModelAfter
assert
variable
tests/test_pydantic_v1.py
test_forward_refs_fn_scope_manual_resolvable
196
null
drivendataorg/erdantic
from pprint import pprint from typing import Optional from attrs import define, resolve_types import pytest from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.attrs as attrs_examples from erdantic.exceptions import UnresolvableForwardRefError from erdantic.plugins.attrs i...
"Party"
assert
string_literal
tests/test_attrs.py
test_forward_refs_global_scope
90
null
drivendataorg/erdantic
import filecmp import re import subprocess import click import pytest from typer.testing import CliRunner import erdantic as erd from erdantic._version import __version__ from erdantic.cli import app, import_object_from_name import erdantic.examples.dataclasses as examples_dataclasses import erdantic.examples.pydanti...
1
assert
numeric_literal
tests/test_cli.py
test_no_overwrite
182
null
drivendataorg/erdantic
from pprint import pprint from typing import Optional from attrs import define, resolve_types import pytest from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.attrs as attrs_examples from erdantic.exceptions import UnresolvableForwardRefError from erdantic.plugins.attrs i...
FnScopeManuallyResolvable
assert
variable
tests/test_attrs.py
test_forward_refs_fn_scope_manual_resolvable
177
null
drivendataorg/erdantic
import dataclasses from dataclasses import dataclass from pprint import pprint from typing import Annotated, Optional, get_type_hints import pytest from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.dataclasses as dataclasses_examples from erdantic.exceptions import Unres...
GlobalWithFwdRefs
assert
variable
tests/test_dataclasses.py
test_forward_refs_global_scope
96
null
drivendataorg/erdantic
from pprint import pprint from typing import Optional import msgspec import pytest from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.msgspec as msgspec_examples from erdantic.exceptions import UnresolvableForwardRefError from erdantic.plugins.msgspec import ( get_fie...
Optional[msgspec_examples.Quest]
assert
complex_expr
tests/test_msgspec.py
test_forward_refs_fn_scope_auto_resolvable
119
null
drivendataorg/erdantic
import dataclasses from dataclasses import dataclass from pprint import pprint from typing import Annotated, Optional, get_type_hints import pytest from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.dataclasses as dataclasses_examples from erdantic.exceptions import Unres...
GlobalOtherClassAfter
assert
variable
tests/test_dataclasses.py
test_forward_refs_global_scope
102
null
drivendataorg/erdantic
from pprint import pprint import sys from typing import Optional import pydantic import pydantic.v1 import pytest from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.pydantic as pydantic_examples from erdantic.exceptions import UnresolvableForwardRefError def test_get_fie...
"str"
assert
string_literal
tests/test_pydantic_v1.py
test_get_fields_from_pydantic_v1_model
45
null
drivendataorg/erdantic
import dataclasses from dataclasses import dataclass from pprint import pprint from typing import Annotated, Optional, get_type_hints import pytest from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.dataclasses as dataclasses_examples from erdantic.exceptions import Unres...
"Party"
assert
string_literal
tests/test_dataclasses.py
test_forward_refs_global_scope
92
null
drivendataorg/erdantic
from pprint import pprint from typing import Optional import msgspec import pytest from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.msgspec as msgspec_examples from erdantic.exceptions import UnresolvableForwardRefError from erdantic.plugins.msgspec import ( get_fie...
UnresolvableForwardRefError, match="'FnScopeManuallyResolvable'")
pytest.raises
complex_expr
tests/test_msgspec.py
test_forward_refs_fn_scope_manual_resolvable
152
null
drivendataorg/erdantic
from pprint import pprint from typing import Optional from attrs import define, resolve_types import pytest from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.attrs as attrs_examples from erdantic.exceptions import UnresolvableForwardRefError from erdantic.plugins.attrs i...
GlobalWithFwdRefs
assert
variable
tests/test_attrs.py
test_forward_refs_global_scope
94
null
drivendataorg/erdantic
from pprint import pprint import sys from typing import Optional import pydantic import pytest from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.pydantic as pydantic_examples from erdantic.exceptions import UnresolvableForwardRefError from erdantic.plugins.pydantic impor...
"members"
assert
string_literal
tests/test_pydantic.py
test_get_fields_from_pydantic_model
52
null
drivendataorg/erdantic
from pprint import pprint import sys from typing import Optional import pydantic import pydantic.v1 import pytest from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.pydantic as pydantic_examples from erdantic.exceptions import UnresolvableForwardRefError def test_forward...
"GlobalOtherModelBefore"
assert
string_literal
tests/test_pydantic_v1.py
test_forward_refs_fn_scope_auto_resolvable
139
null
drivendataorg/erdantic
from pprint import pprint import sys from typing import Optional import pydantic import pydantic.v1 import pytest from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.pydantic as pydantic_examples from erdantic.exceptions import UnresolvableForwardRefError def test_forward...
"GlobalWithFwdRefs"
assert
string_literal
tests/test_pydantic_v1.py
test_forward_refs_global_scope
100
null
drivendataorg/erdantic
from pprint import pprint import sys from typing import Optional import pydantic import pytest from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.pydantic as pydantic_examples from erdantic.exceptions import UnresolvableForwardRefError from erdantic.plugins.pydantic impor...
4
assert
numeric_literal
tests/test_pydantic.py
test_get_fields_from_pydantic_model
40
null
drivendataorg/erdantic
from pprint import pprint from typing import Optional from attrs import define, resolve_types import pytest from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.attrs as attrs_examples from erdantic.exceptions import UnresolvableForwardRefError from erdantic.plugins.attrs i...
"FnScopeOtherClassBefore"
assert
string_literal
tests/test_attrs.py
test_forward_refs_fn_scope_manual_resolvable
179
null
drivendataorg/erdantic
from pprint import pprint import sys from typing import Optional import pydantic import pytest from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.pydantic as pydantic_examples from erdantic.exceptions import UnresolvableForwardRefError from erdantic.plugins.pydantic impor...
"name"
assert
string_literal
tests/test_pydantic.py
test_get_fields_from_pydantic_model
44
null
drivendataorg/erdantic
from pprint import pprint import sys from typing import Optional import pydantic import pydantic.v1 import pytest from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.pydantic as pydantic_examples from erdantic.exceptions import UnresolvableForwardRefError def test_get_fie...
"datetime"
assert
string_literal
tests/test_pydantic_v1.py
test_get_fields_from_pydantic_v1_model
49
null
drivendataorg/erdantic
import filecmp import os from pathlib import Path import sys import filetype import pytest import erdantic as erd import erdantic._version import erdantic.core import erdantic.examples from tests.snapshot_cases import SNAPSHOT_CASES as SNAPSHOT_MODEL_CASES from tests.utils import assert_dot_equals ASSETS_DIR = Path(...
expected_path.read_text())
assert_*
func_call
tests/test_against_assets.py
test_to_dot_examples_against_static_assets
82
null
drivendataorg/erdantic
from pprint import pprint from typing import Optional import msgspec import pytest from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.msgspec as msgspec_examples from erdantic.exceptions import UnresolvableForwardRefError from erdantic.plugins.msgspec import ( get_fie...
"members"
assert
string_literal
tests/test_msgspec.py
test_get_fields_from_msgspec_struct
44
null
drivendataorg/erdantic
import filecmp import os from pathlib import Path import sys import filetype import pytest import erdantic as erd import erdantic._version import erdantic.core import erdantic.examples from tests.snapshot_cases import SNAPSHOT_CASES as SNAPSHOT_MODEL_CASES from tests.utils import assert_dot_equals ASSETS_DIR = Path(...
None
assert
none_literal
tests/test_against_assets.py
test_draw_png_examples_against_static_assets
53
null
drivendataorg/erdantic
from pprint import pprint import sys from typing import Optional import pydantic import pytest from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.pydantic as pydantic_examples from erdantic.exceptions import UnresolvableForwardRefError from erdantic.plugins.pydantic impor...
Optional[FnScopeOtherModelAfter]
assert
complex_expr
tests/test_pydantic.py
test_forward_refs_fn_scope_manual_resolvable
187
null
drivendataorg/erdantic
import erdantic as erd from erdantic.core import Cardinality, Modality from erdantic.d2 import ( _get_crowsfoot_d2, _get_visibility_prefix, _maybe_quote_value, _quote_identifier, render_d2, ) from erdantic.examples import pydantic def test_get_d2_cardinality_unspecified_combinations(): """Expli...
"cf-one"
assert
string_literal
tests/test_d2.py
test_get_d2_cardinality_unspecified_combinations
62
null
drivendataorg/erdantic
import pytest from erdantic.convenience import create, find_models from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.dataclasses as dataclasses_examples import erdantic.examples.pydantic as pydantic_examples from erdantic.exceptions import PluginNotFoundError def test_fi...
PluginNotFoundError)
pytest.raises
variable
tests/test_convenience.py
test_find_models
32
null
drivendataorg/erdantic
from pprint import pprint from typing import Optional from attrs import define, resolve_types import pytest from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.attrs as attrs_examples from erdantic.exceptions import UnresolvableForwardRefError from erdantic.plugins.attrs i...
"members"
assert
string_literal
tests/test_attrs.py
test_get_fields_from_attrs_class
44
null
drivendataorg/erdantic
import builtins import dataclasses import filecmp import os from pathlib import Path import sys from typing import Annotated, Any, AnyStr, List, Literal, Optional, Tuple, TypeVar import IPython.lib.pretty as IPython_pretty import pydantic import pytest import rich from erdantic.core import ( Edge, EntityRelat...
edge_key
assert
variable
tests/test_core.py
test_key
182
null
drivendataorg/erdantic
import pytest from erdantic.convenience import create, find_models from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.dataclasses as dataclasses_examples import erdantic.examples.pydantic as pydantic_examples from erdantic.exceptions import PluginNotFoundError def test_fi...
expected_pydantic_models
assert
variable
tests/test_convenience.py
test_find_models
17
null
drivendataorg/erdantic
import dataclasses from dataclasses import dataclass from pprint import pprint from typing import Annotated, Optional, get_type_hints import pytest from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.dataclasses as dataclasses_examples from erdantic.exceptions import Unres...
4
assert
numeric_literal
tests/test_dataclasses.py
test_get_fields_from_dataclass
34
null
drivendataorg/erdantic
import erdantic as erd from erdantic.core import Cardinality, Modality from erdantic.d2 import ( _get_crowsfoot_d2, _get_visibility_prefix, _maybe_quote_value, _quote_identifier, render_d2, ) from erdantic.examples import pydantic def test_get_visibility_prefix(): """Test visibility prefix dete...
"#"
assert
string_literal
tests/test_d2.py
test_get_visibility_prefix
40
null
drivendataorg/erdantic
import filecmp import os from pathlib import Path import sys import filetype import pytest import erdantic as erd import erdantic._version import erdantic.core import erdantic.examples from tests.snapshot_cases import SNAPSHOT_CASES as SNAPSHOT_MODEL_CASES from tests.utils import assert_dot_equals ASSETS_DIR = Path(...
"image/png"
assert
string_literal
tests/test_against_assets.py
test_draw_png_examples_against_static_assets
54
null
drivendataorg/erdantic
import erdantic as erd from erdantic.core import Cardinality, Modality from erdantic.d2 import ( _get_crowsfoot_d2, _get_visibility_prefix, _maybe_quote_value, _quote_identifier, render_d2, ) from erdantic.examples import pydantic def test_get_d2_cardinality_unspecified_combinations(): """Expli...
"cf-one-required"
assert
string_literal
tests/test_d2.py
test_get_d2_cardinality_unspecified_combinations
64
null
drivendataorg/erdantic
from pprint import pprint import sys from typing import Optional import pydantic import pytest from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.pydantic as pydantic_examples from erdantic.exceptions import UnresolvableForwardRefError from erdantic.plugins.pydantic impor...
"str"
assert
string_literal
tests/test_pydantic.py
test_get_fields_from_pydantic_model
45
null
drivendataorg/erdantic
import dataclasses from dataclasses import dataclass from pprint import pprint from typing import Annotated, Optional, get_type_hints import pytest from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.dataclasses as dataclasses_examples from erdantic.exceptions import Unres...
"FnScopeOtherClassAfter"
assert
string_literal
tests/test_dataclasses.py
test_forward_refs_fn_scope_manual_resolvable
184
null
drivendataorg/erdantic
from pprint import pprint import sys from typing import Optional import pydantic import pydantic.v1 import pytest from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.pydantic as pydantic_examples from erdantic.exceptions import UnresolvableForwardRefError def test_forward...
"FnScopeOtherModelBefore"
assert
string_literal
tests/test_pydantic_v1.py
test_forward_refs_fn_scope_manual_resolvable
191
null
drivendataorg/erdantic
import dataclasses from dataclasses import dataclass from pprint import pprint from typing import Annotated, Optional, get_type_hints import pytest from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.dataclasses as dataclasses_examples from erdantic.exceptions import Unres...
"name"
assert
string_literal
tests/test_dataclasses.py
test_get_fields_from_dataclass
38
null
drivendataorg/erdantic
import pytest from erdantic.convenience import create, find_models from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.dataclasses as dataclasses_examples import erdantic.examples.pydantic as pydantic_examples from erdantic.exceptions import PluginNotFoundError def test_fi...
set()
assert
func_call
tests/test_convenience.py
test_find_models
22
null
drivendataorg/erdantic
from pprint import pprint from typing import Optional from attrs import define, resolve_types import pytest from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.attrs as attrs_examples from erdantic.exceptions import UnresolvableForwardRefError from erdantic.plugins.attrs i...
FnScopeOtherClassAfter
assert
variable
tests/test_attrs.py
test_forward_refs_fn_scope_manual_resolvable
183
null
drivendataorg/erdantic
import dataclasses from dataclasses import dataclass from pprint import pprint from typing import Annotated, Optional, get_type_hints import pytest from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.dataclasses as dataclasses_examples from erdantic.exceptions import Unres...
"GlobalWithFwdRefs"
assert
string_literal
tests/test_dataclasses.py
test_forward_refs_global_scope
95
null
drivendataorg/erdantic
import builtins import dataclasses import filecmp import os from pathlib import Path import sys from typing import Annotated, Any, AnyStr, List, Literal, Optional, Tuple, TypeVar import IPython.lib.pretty as IPython_pretty import pydantic import pytest import rich from erdantic.core import ( Edge, EntityRelat...
"str"
assert
string_literal
tests/test_core.py
test_field_info_annotated
88
null
drivendataorg/erdantic
import dataclasses from dataclasses import dataclass from pprint import pprint from typing import Annotated, Optional, get_type_hints import pytest from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.dataclasses as dataclasses_examples from erdantic.exceptions import Unres...
GlobalOtherClassBefore
assert
variable
tests/test_dataclasses.py
test_forward_refs_global_scope
99
null
drivendataorg/erdantic
from pprint import pprint import sys from typing import Optional import pydantic import pydantic.v1 import pytest from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.pydantic as pydantic_examples from erdantic.exceptions import UnresolvableForwardRefError def test_forward...
pydantic_v1_examples.Party
assert
complex_expr
tests/test_pydantic_v1.py
test_forward_refs_fn_scope_auto_resolvable
136
null
drivendataorg/erdantic
import pytest from erdantic.convenience import create, find_models from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.dataclasses as dataclasses_examples import erdantic.examples.pydantic as pydantic_examples from erdantic.exceptions import PluginNotFoundError def test_te...
expected_model_keys
assert
variable
tests/test_convenience.py
test_terminal_models
57
null
drivendataorg/erdantic
import dataclasses from dataclasses import dataclass from pprint import pprint from typing import Annotated, Optional, get_type_hints import pytest from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.dataclasses as dataclasses_examples from erdantic.exceptions import Unres...
FnScopeOtherClassBefore
assert
variable
tests/test_dataclasses.py
test_forward_refs_fn_scope_manual_resolvable
182
null
drivendataorg/erdantic
from pprint import pprint from typing import Optional from attrs import define, resolve_types import pytest from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.attrs as attrs_examples from erdantic.exceptions import UnresolvableForwardRefError from erdantic.plugins.attrs i...
"FnScopeOtherClassAfter"
assert
string_literal
tests/test_attrs.py
test_forward_refs_fn_scope_manual_resolvable
182
null
drivendataorg/erdantic
import subprocess import sys import textwrap import pytest import erdantic.examples from erdantic.exceptions import PluginNotFoundError from erdantic.plugins import ( get_field_extractor_fn, get_predicate_fn, identify_field_extractor_fn, list_plugins, ) import erdantic.plugins.attrs import erdantic.pl...
PluginNotFoundError)
pytest.raises
variable
tests/test_plugins.py
test_get_predicate_fn
51
null
drivendataorg/erdantic
from pprint import pprint import sys from typing import Optional import pydantic import pytest from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.pydantic as pydantic_examples from erdantic.exceptions import UnresolvableForwardRefError from erdantic.plugins.pydantic impor...
GlobalOtherModelBefore
assert
variable
tests/test_pydantic.py
test_forward_refs_global_scope
103
null
drivendataorg/erdantic
import filecmp import os from pathlib import Path import sys import filetype import pytest import erdantic as erd import erdantic._version import erdantic.core import erdantic.examples from tests.snapshot_cases import SNAPSHOT_CASES as SNAPSHOT_MODEL_CASES from tests.utils import assert_dot_equals ASSETS_DIR = Path(...
expected_path.read_text().strip()
assert
func_call
tests/test_against_assets.py
test_to_d2_examples_against_static_assets
109
null
drivendataorg/erdantic
import dataclasses from dataclasses import dataclass from pprint import pprint from typing import Annotated, Optional, get_type_hints import pytest from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.dataclasses as dataclasses_examples from erdantic.exceptions import Unres...
FnScopeOtherClassAfter
assert
variable
tests/test_dataclasses.py
test_forward_refs_fn_scope_manual_resolvable
185
null
drivendataorg/erdantic
import builtins import dataclasses import filecmp import os from pathlib import Path import sys from typing import Annotated, Any, AnyStr, List, Literal, Optional, Tuple, TypeVar import IPython.lib.pretty as IPython_pretty import pydantic import pytest import rich from erdantic.core import ( Edge, EntityRelat...
tp
assert
variable
tests/test_core.py
test_field_info_annotated
89
null
drivendataorg/erdantic
from pprint import pprint import sys from typing import Optional import pydantic import pytest from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.pydantic as pydantic_examples from erdantic.exceptions import UnresolvableForwardRefError from erdantic.plugins.pydantic impor...
UnresolvableForwardRefError, match="'FnScopeOtherModelAfter'")
pytest.raises
complex_expr
tests/test_pydantic.py
test_forward_refs_fn_scope_manual_resolvable
168
null
drivendataorg/erdantic
import filecmp import os from pathlib import Path import sys import filetype import pytest import erdantic as erd import erdantic._version import erdantic.core import erdantic.examples from tests.snapshot_cases import SNAPSHOT_CASES as SNAPSHOT_MODEL_CASES from tests.utils import assert_dot_equals ASSETS_DIR = Path(...
expected_path.read_text()
assert
func_call
tests/test_against_assets.py
test_json_examples_against_static_assets
94
null
drivendataorg/erdantic
import builtins import dataclasses import filecmp import os from pathlib import Path import sys from typing import Annotated, Any, AnyStr, List, Literal, Optional, Tuple, TypeVar import IPython.lib.pretty as IPython_pretty import pydantic import pytest import rich from erdantic.core import ( Edge, EntityRelat...
diagram3
assert
variable
tests/test_core.py
test_equality
147
null
drivendataorg/erdantic
from pprint import pprint import sys from typing import Optional import pydantic import pydantic.v1 import pytest from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.pydantic as pydantic_examples from erdantic.exceptions import UnresolvableForwardRefError def test_forward...
GlobalWithFwdRefs
assert
variable
tests/test_pydantic_v1.py
test_forward_refs_global_scope
101
null
drivendataorg/erdantic
from pprint import pprint from typing import Optional import msgspec import pytest from erdantic.core import EntityRelationshipDiagram, FullyQualifiedName import erdantic.examples.msgspec as msgspec_examples from erdantic.exceptions import UnresolvableForwardRefError from erdantic.plugins.msgspec import ( get_fie...
"GlobalWithFwdRefs"
assert
string_literal
tests/test_msgspec.py
test_forward_refs_global_scope
90
null
bytedance/trae-agent
import unittest from trae_agent.tools.base import ToolCallArguments from trae_agent.tools.bash_tool import BashTool class TestBashTool(unittest.IsolatedAsyncioTestCase): def setUp(self): self.tool = BashTool() async def asyncTearDown(self): # Cleanup any active session if self.tool._s...
result.output)
self.assertIn
complex_expr
tests/tools/test_bash_tool.py
test_session_restart
TestBashTool
51
null
bytedance/trae-agent
import unittest from unittest.mock import patch from trae_agent.utils.config import Config, ModelConfig, ModelProvider from trae_agent.utils.legacy_config import LegacyConfig from trae_agent.utils.llm_clients.anthropic_client import AnthropicClient from trae_agent.utils.llm_clients.openai_client import OpenAIClient c...
"https://custom-openai.example.com/v1")
self.assertEqual
string_literal
tests/utils/test_config.py
test_config_with_base_url_in_config
TestConfigBaseURL
33
null
bytedance/trae-agent
import unittest from trae_agent.tools.base import ToolCallArguments from trae_agent.tools.bash_tool import BashTool class TestBashTool(unittest.IsolatedAsyncioTestCase): def setUp(self): self.tool = BashTool() async def asyncTearDown(self): # Cleanup any active session if self.tool._s...
result.error.lower())
self.assertIn
func_call
tests/tools/test_bash_tool.py
test_missing_command_handling
TestBashTool
63
null
bytedance/trae-agent
import unittest from unittest.mock import AsyncMock, MagicMock, patch from trae_agent.utils.mcp_client import MCPClient, MCPServerConfig, MCPServerStatus class TestMCPClient(unittest.IsolatedAsyncioTestCase): def setUp(self): self.client = MCPClient() async def test_list_tools(self): mock_ses...
["tool1", "tool2"])
self.assertEqual
collection
tests/utils/test_mcp_client.py
test_list_tools
TestMCPClient
84
null
bytedance/trae-agent
import unittest from unittest.mock import MagicMock, patch from trae_agent.agent.agent_basics import AgentError from trae_agent.agent.trae_agent import TraeAgent from trae_agent.utils.config import Config from trae_agent.utils.legacy_config import LegacyConfig from trae_agent.utils.llm_clients.llm_basics import LLMRes...
len(tools))
self.assertEqual
func_call
tests/agent/test_trae_agent.py
test_tool_initialization
TestTraeAgentExtended
110
null
bytedance/trae-agent
import unittest from unittest.mock import AsyncMock, MagicMock from trae_agent.tools.base import ToolCallArguments, ToolExecResult from trae_agent.tools.mcp_tool import MCPTool class TestMCPTool(unittest.IsolatedAsyncioTestCase): def setUp(self): # simulate a tool schema self.mock_tool = MagicMock...
"test_tool")
self.assertEqual
string_literal
tests/tools/test_mcp_tool.py
test_get_name
TestMCPTool
27
null
bytedance/trae-agent
import unittest from unittest.mock import MagicMock, patch from trae_agent.agent.agent_basics import AgentError from trae_agent.agent.trae_agent import TraeAgent from trae_agent.utils.config import Config from trae_agent.utils.legacy_config import LegacyConfig from trae_agent.utils.llm_clients.llm_basics import LLMRes...
AgentError)
self.assertRaises
variable
tests/agent/test_trae_agent.py
test_new_task_initialization
TestTraeAgentExtended
50
null
bytedance/trae-agent
import unittest from unittest.mock import AsyncMock, MagicMock from trae_agent.tools.base import ToolCallArguments, ToolExecResult from trae_agent.tools.mcp_tool import MCPTool class TestMCPTool(unittest.IsolatedAsyncioTestCase): def setUp(self): # simulate a tool schema self.mock_tool = MagicMock...
"Execution successful")
self.assertEqual
string_literal
tests/tools/test_mcp_tool.py
test_execute_success
TestMCPTool
51
null
bytedance/trae-agent
import unittest from unittest.mock import AsyncMock, MagicMock, patch from trae_agent.utils.mcp_client import MCPClient, MCPServerConfig, MCPServerStatus class TestMCPClient(unittest.IsolatedAsyncioTestCase): def setUp(self): self.client = MCPClient() async def test_connect_and_discover_invalid_confi...
0)
self.assertEqual
numeric_literal
tests/utils/test_mcp_client.py
test_connect_and_discover_invalid_config
TestMCPClient
68
null
bytedance/trae-agent
import unittest from unittest.mock import patch from trae_agent.utils.config import Config, ModelConfig, ModelProvider from trae_agent.utils.legacy_config import LegacyConfig from trae_agent.utils.llm_clients.anthropic_client import AnthropicClient from trae_agent.utils.llm_clients.openai_client import OpenAIClient c...
[])
self.assertEqual
collection
tests/utils/test_config.py
test_mcp_servers_config
TestLakeviewConfig
224
null
bytedance/trae-agent
import unittest from unittest.mock import AsyncMock, MagicMock, patch from trae_agent.utils.mcp_client import MCPClient, MCPServerConfig, MCPServerStatus class TestMCPClient(unittest.IsolatedAsyncioTestCase): def setUp(self): self.client = MCPClient() def test_get_default_server_status(self): ...
MCPServerStatus.DISCONNECTED)
self.assertEqual
complex_expr
tests/utils/test_mcp_client.py
test_get_default_server_status
TestMCPClient
13
null
bytedance/trae-agent
import unittest from unittest.mock import patch from trae_agent.utils.config import Config, ModelConfig, ModelProvider from trae_agent.utils.legacy_config import LegacyConfig from trae_agent.utils.llm_clients.anthropic_client import AnthropicClient from trae_agent.utils.llm_clients.openai_client import OpenAIClient c...
"anthropic")
self.assertEqual
string_literal
tests/utils/test_config.py
test_lakeview_defaults_to_main_provider
TestLakeviewConfig
199
null
bytedance/trae-agent
import os import unittest from unittest.mock import MagicMock, patch from trae_agent.tools.base import Tool, ToolCall, ToolResult from trae_agent.utils.config import ModelConfig, ModelProvider from trae_agent.utils.llm_clients.google_client import GoogleClient from trae_agent.utils.llm_clients.llm_basics import LLMMes...
"tool")
self.assertEqual
string_literal
tests/utils/test_google_client.py
test_parse_messages
TestGoogleClient
235
null
bytedance/trae-agent
import unittest from unittest.mock import patch from trae_agent.utils.config import Config, ModelConfig, ModelProvider from trae_agent.utils.legacy_config import LegacyConfig from trae_agent.utils.llm_clients.anthropic_client import AnthropicClient from trae_agent.utils.llm_clients.openai_client import OpenAIClient c...
"https://api.anthropic.com")
self.assertEqual
string_literal
tests/utils/test_config.py
test_default_anthropic_base_url
TestConfigBaseURL
68
null
bytedance/trae-agent
import os import unittest from unittest.mock import MagicMock, patch from trae_agent.tools.base import Tool, ToolCall, ToolResult from trae_agent.utils.config import ModelConfig, ModelProvider from trae_agent.utils.llm_clients.google_client import GoogleClient from trae_agent.utils.llm_clients.llm_basics import LLMMes...
"Hello, world!")
self.assertEqual
string_literal
tests/utils/test_google_client.py
test_google_set_chat_history
TestGoogleClient
109
null
bytedance/trae-agent
import unittest from unittest.mock import AsyncMock, MagicMock from trae_agent.tools.base import ToolCallArguments, ToolExecResult from trae_agent.tools.mcp_tool import MCPTool class TestMCPTool(unittest.IsolatedAsyncioTestCase): def setUp(self): # simulate a tool schema self.mock_tool = MagicMock...
any(p.name == "param2" and not p.required for p in params))
self.assertTrue
func_call
tests/tools/test_mcp_tool.py
test_get_parameters
TestMCPTool
39
null
bytedance/trae-agent
import unittest from unittest.mock import MagicMock, patch from trae_agent.agent.agent_basics import AgentError from trae_agent.agent.trae_agent import TraeAgent from trae_agent.utils.config import Config from trae_agent.utils.legacy_config import LegacyConfig from trae_agent.utils.llm_clients.llm_basics import LLMRes...
mock_console)
self.assertEqual
variable
tests/agent/test_trae_agent.py
test_public_property_access_allowed
TestTraeAgentExtended
147
null
bytedance/trae-agent
import unittest from trae_agent.tools.base import ToolCallArguments from trae_agent.tools.bash_tool import BashTool class TestBashTool(unittest.IsolatedAsyncioTestCase): def setUp(self): self.tool = BashTool() async def asyncTearDown(self): # Cleanup any active session if self.tool._s...
param_names)
self.assertIn
variable
tests/tools/test_bash_tool.py
test_tool_initialization
TestBashTool
25
null
bytedance/trae-agent
import unittest from unittest.mock import patch from trae_agent.utils.config import Config, ModelConfig, ModelProvider from trae_agent.utils.legacy_config import LegacyConfig from trae_agent.utils.llm_clients.anthropic_client import AnthropicClient from trae_agent.utils.llm_clients.openai_client import OpenAIClient c...
"https://custom-anthropic.example.com")
self.assertEqual
string_literal
tests/utils/test_config.py
test_anthropic_client_base_url_attribute_set
TestConfigBaseURL
115
null
bytedance/trae-agent
import os import unittest from trae_agent.utils.config import ModelConfig, ModelProvider from trae_agent.utils.llm_clients.llm_basics import LLMMessage from trae_agent.utils.llm_clients.openrouter_client import OpenRouterClient TEST_MODEL = "mistralai/mistral-small-3.2-24b-instruct:free" class TestOpenRouterClient(u...
False)
self.assertEqual
bool_literal
tests/utils/test_openrouter_client_utils.py
test_supports_tool_calling
TestOpenRouterClient
118
null