Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/msgspec/msgspec
/ Test
Class
Test
tests/unit/test_struct.py:115–118 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
113
114
def
test_struct_instance_attributes():
115
class
Test(Struct):
116
c: int
117
b: float
118
a: str =
"hello"
119
120
x = Test(1, 2.0, a=
"goodbye"
)
121
Callers
15
test_struct_instance_attributes
Function · 0.70
test_mixin_nonempty_slots
Method · 0.70
test_init_positional
Method · 0.70
test_init_kw_only
Method · 0.70
test_init_kw_only_mixed
Method · 0.70
test_repr_empty
Method · 0.70
test_repr_one_field
Method · 0.70
test_repr_two_fields
Method · 0.70
test_repr_omit_defaults_empty
Method · 0.70
test_repr_omit_defaults_one_field
Method · 0.70
test_repr_omit_defaults_multiple_fields
Method · 0.70
test_repr_recursive
Method · 0.70
Calls
2
field
Function · 0.90
Foo
Class · 0.70
Tested by
15
test_struct_instance_attributes
Function · 0.56
test_mixin_nonempty_slots
Method · 0.56
test_init_positional
Method · 0.56
test_init_kw_only
Method · 0.56
test_init_kw_only_mixed
Method · 0.56
test_repr_empty
Method · 0.56
test_repr_one_field
Method · 0.56
test_repr_two_fields
Method · 0.56
test_repr_omit_defaults_empty
Method · 0.56
test_repr_omit_defaults_one_field
Method · 0.56
test_repr_omit_defaults_multiple_fields
Method · 0.56
test_repr_recursive
Method · 0.56
Used in the wild
real call sites across dependent graphs
searching dependent graphs…